Julian Assange was arrested in London last month after spending seven years inside the embassy. (File)

The Swedish prosecutor heading an investigation into a rape allegation against WikiLeaks founder Julian Assange filed a request with a local court on Monday for him to be detained in absentia.

If granted, the court order would be the first step in a process to have Assange extradited from Britain, where he is serving a 50-week sentence for skipping bail.

Sweden reopened the rape investigation last week. It was begun in 2010 but dropped in 2017 after Assange took refuge in the Ecuadorean embassy in London.

Assange, who denies the accusation, was arrested in London last month after spending seven years inside the embassy.

"I request the District Court to detain Assange in his absence, on probable cause suspected for rape," Deputy Chief Prosecutor Eva-Marie Persson said in a statement on Monday.

She said she would issue a European arrest warrant for Assange to be surrendered to Sweden if the court decided to detain him.

Sweden's decision to reopen the rape investigation casts doubt on where Assange may eventually end up, with US authorities already seeking his extradition over conspiracy charges relating to one of the biggest ever leaks of classified information.

A lawyer representing Assange in Sweden said he would tell the District Court it could not investigate the prosecutor's request until he had conferred with his client and learned whether or not he wished to oppose a detention order.

"Since he is in prison in England, it has so far not been possible even to speak to him by telephone," Per Samuelson told Reuters.

Assange, an Australian national, took refuge in the embassy after fighting unsuccessfully through the British courts to avoid extradition to Sweden.

The British courts will have to rule on the Swedish and US extradition requests, with interior minister Sajid Javid having the final say on which one takes precedence.

"The outcome of this process is impossible to predict," Persson said. Citing information from UK authorities, she said Assange would serve 25 weeks of his UK sentence before he could be released.

A British judge has given the US government a deadline of June 12 to outline its case against Assange.