Ecuador has set a date for the questioning of Julian Assange over a Swedish rape allegation, a move that could end a four-year-long deadlock ever since the WikiLeaks founder took refuge in Ecuador’s London embassy.

Swedish prosecutors said the questioning would take place on 17 October and be conducted by an Ecuadorian prosecutor. Swedish chief prosecutor Ingrid Isgren and a police investigator will be allowed to be present to ask questions through the Ecuadorian prosecutor, who will later report the findings to Sweden.

“After the report, the Swedish prosecutor will take a view on the continuing of the investigation,” Swedish prosecutors said in a statement.

Swedish authorities want to question Assange, 45, over allegations that he committed rape in 2010. Assange denies the allegations.

Even if Sweden drops the investigation, Assange is likely to be arrested for breaching bail conditions in Britain.

On Friday, a Swedish appeals court will take a decision on whether to overturn a European arrest warrant.

Assange filed the request after a UN panel in February said his stay at the Ecuadorian embassy equalled arbitrary detention, that he should be let go and awarded compensation.

A previous request by Assange to overturn the arrest warrant was denied but the appeals court then criticised prosecutors for not having done enough to take the investigation forward.

Swedish prosecutors then last year agreed to conduct the interview in London after having insisted Assange needed to come to Sweden for the questioning.

In mid-August, Ecuador said they would allow the questioning of Assange at its London embassy.

Assange has refused to go to Sweden for questioning, saying he fears extradition to the United States, where a criminal investigation into the activities of WikiLeaks is ongoing.

In 2010, WikiLeaks published classified US military and diplomatic documents in one of the largest information leaks in US history.

Assange dismissed the rape allegations in a TV interview with Sweden’s SVT last week.

“The Swedish case, it’s a nothing case, right, so that is easy. The US case. I don’t believe the US will ever drop that case,” he said.