WikiLeaks founder Julian Assange will learn next month if he has succeeded in having a warrant for his arrest dropped.
The Australian has been holed up in the Ecuadorian embassy in London for more than five years because he fears extradition to the US.
Mr Assange, 46, fled to the embassy in the British capital in 2012 after skipping bail to avoid being sent to Sweden to face an allegation of rape, which he denied.
He had feared Sweden would hand him over to the US to face prosecution over WikiLeaks' publication of classified military and diplomatic documents, one of the largest information leaks in American history.
In May last year, Swedish prosecutors dropped their investigation into the allegation and withdrew their European Arrest Warrant.
But British police have insisted Mr Assange would still be arrested for breaching bail conditions should he leave the embassy.
- Julian Assange's health reportedly in 'dangerous' condition
- Ecuador remains stuck with Julian Assange
Mr Assange's lawyers went to court on Friday to argue that the warrant serves no purpose because he is no longer wanted for questioning in Sweden over alleged sex offences.
Mark Summers told Westminster Magistrates Court that the arrest warrant had "lost its purpose and its function".
Mr Assange's lawyers also said in court papers that five years in conditions "akin to imprisonment, without access to adequate medical care or sunlight" had left his mental and physical health "in serious peril".
Judge Emma Arbuthnot said evidence presented to the court detailed Assange's health issues included "a terrible bad tooth, frozen shoulder and depression".
Crown Prosecution Service lawyer Aaron Watkins said it would be "absurd" if a defendant were to be effectively rewarded for managing to evade proceedings for sufficiently long that existing court proceedings happened to fall away.
He said Mr Assange's lawyers were simply trying to look at British laws and then construct an argument that would allow their client to walk free from the embassy.
Judge Arbuthnot added she would make her ruling on the arrest warrant on February 6.