A Swedish court has dismissed a request for WikiLeaks founder Julian Assange to be detained in absentia in a rape case, BBC reported on Monday.

Prosecutors would have moved ahead with Assange’s extradition had their request been approved. Under Swedish law, detention in absentia allows prosecutors to issue a European Arrest Warrant in cases where the defendant is abroad or in hiding.

The Uppsala District Court agreed that Assange is a potential flight risk but rejected a detention request, saying he need not be formally detained for interrogation by Swedish prosecutors as he is was already in a prison in the United Kingdom, The Guardian reported.

“As Julian Assange is currently serving a prison sentence, the investigation can proceed with the help of a European investigation order, which does not require Julian Assange’s detention [in Sweden],” the court said. “The court therefore does not find it proportional to detain Julian Assange.”

However, Assange’s lawyer Per Samuelson said Assange was not a flight risk precisely because he is in prison. “The [rape] investigation continues with interviews in Sweden,” said prosecutor Eva-Marie Persson after the court order on Monday, according to Reuters. “I will also issue a European Investigation Order in order to interview Julian Assange.”

On May 1, the WikiLeaks founder was sentenced to 50 weeks in a UK prison for skipping bail in 2012 and seeking refuge in the Ecuadorian embassy in London. He spent seven years in the embassy before being arrested in April, soon after Ecuador rescinded his asylum.

The United States also wants Assange to be extradited on charges related to the public release of military secrets in 2010. Last month, he was indicted for violating the Espionage Act.