A Swedish court has upheld an arrest warrant for WikiLeaks founder Julian Assange, who found shelter in Ecuador's embassy in London two years ago.

The Stockholm District Court moved to uphold the warrant on Wednesday following a legal challenge from Assange’s lawyers in June. The challenge was spurred by a change to Swedish criminal proceedings regarding the right to information in criminal procedures which brings the country in line with an EU directive.

Verdict today: Julian #Assange is to REMAIN in detention in absentia. Just announced in Stockholm District Court. http://t.co/nOuKXtQiRd — Rick Falkvinge (@Falkvinge) July 16, 2014

Swedish Judge Lena Egelin was quick to dismiss the legal challenge to Assange's arrest warrant, but noted that the decision could still be appealed.

#Assange's defence team says they will appeal to a higher court. "This has to come to an end" Kristinn Hrafnsson from @wikileaks told me — Per Nyberg (@per_nyberg) July 16, 2014

Assange’s defense team had argued the European arrest warrant should be lifted on grounds that the prosecution had failed to act in a timely manner by not interviewing their client at the embassy. They also said that detaining a suspect for the duration of the investigation was an excessive use of force that was not in the public interest.

Saying the evidence provided by the plaintiffs was insufficient to back up the allegations, they further charged Assange was being threatened by the United States.

“Assange was granted political asylum by Ecuador on August 16, 2012. There has been a clear and present danger in the form of threats from the United States, ranging from extradition to plain assassination and execution,” Falkvinge.net cites the defense as saying during the proceedings.

“Assange has a full legal right to maintain his political asylum, and therefore, the detention serves no further purpose,” they added. “This has now dragged on for three years and six months. In this time, in all this time, Assange has been restrained in various ways, everything from jail to something resembling a permanent house arrest.”

The prosecution rejected claims it was dragging its feet, saying an interview with Assange at the embassy would not be “effective,” as the trial would have to be conducted in Sweden if charges are brought.

They said Assange has been given all the evidence relevant to the case, and they had made "repeated" attempts to contact him to conduct interviews about the allegations.

The prosecution continued that Assange had chosen to restrict his own movement by remaining in the embassy, and any interview on its grounds would stifle their investigation, especially if they needed to take DNA evidence.

They added that he remains a potential flight risk.

Meanwhile, Camilla Murray, chief administrator at the court, earlier told AFP a decision in favor of Assange did not necessarily mean the case against Assange would be dropped.

“The charges will not be dropped just because the court cancels the arrest warrant. But I cannot answer for the prosecutors and what they will do. They are the ones leading the investigation," she said.

Assange himself had said that even if the Swedish prosecutors decided to drop the case, it was only one aspect of a broader legal battle keeping him stuck at the embassy.

“I still have the larger problem, which is that of the United States and its pending prosecution, and perhaps extradition warrant,” he told reporters in June.

He fears that being sent to Sweden would facilitate his extradition to the United States, where he is being investigated for espionage.

On February 20 2011, US Ambass to UK, Louis Sussman, told BBC’s Andrew Marr that the US wouldn't act until #Assange Swedish case was over. — WikiLeaks (@wikileaks) July 16, 2014

In an interview with Reuters last year Assange confessed that he wouldn’t feel safe even if Sweden dropped charges against him because he could be arrested anyway on the order of the US so he would better staying in the safe haven of the Ecuadoran embassy.

Assange sought refuge in the embassy in Britain in June 2012 after exhausting all legal options at British courts to avoid being extradited to Sweden, where he is wanted for questioning regarding allegations of rape and sexual molestation.

Media reminder: No woman accused #Assange of "rape". The Swedish state did. The women expressly denied it. http://t.co/FjI49oc0Eg — WikiLeaks (@wikileaks) July 16, 2014

As of early June 2014, the total cost of the measures implemented by the British security services to prevent Assange from escaping the Ecuadorian premises has amounted to £6 million ($10.28 million) for the British taxpayers since the moment Assange entered the embassy in 2012.

In 2010 Assange oversaw the analysis and publication of over half a million documents from the Pentagon and US State Department - the largest such publication in history.

Since the leaks, various US officials and pundits have accused Assange of terrorism, with some going so far as to call for his capture or assassination.