STOCKHOLM — Swedish prosecutors will have to drop a six-year-old rape investigation against Julian Assange unless they find a way to interrogate the WikiLeaks founder at the Ecuadorian Embassy in London, a top investigator said Wednesday.

Ecuador recently said it has approved a Swedish request to question Assange at the embassy, where he has been holed up for four years, but prosecutors said the details remain to be worked out.

“We are now awaiting information on how and when the questioning will take place, and whether we will be allowed to be present,” Director of Public Prosecution Marianne Ny told reporters in Stockholm.

Ny said prosecutors would prefer to interrogate Assange in person, but would also accept to send a list of questions and let Ecuadorian officials handle the questioning, as the South American country has proposed.

The rape allegation stems from Assange’s visit to Sweden in 2010. He denies the allegation as well as other less serious allegations of sexual misconduct against two women for which the statute of limitations has expired.

Chief prosecutor Ingrid Isgren said the questioning is crucial to the case, which has turned into a diplomatic back-and-forth involving Sweden, Britain and Ecuador.

“We will not be able to indict Julian Assange if we are not able to interview him first,” Isgren said.

She said Swedish law requires prosecutors to question a suspect and inform him of the suspicions against him before filing a formal indictment.

Assange sought shelter at the Ecuadorian Embassy in London in 2012 after British courts rejected his attempts to fight extradition to Sweden.

Assange fears that if he is extradited to Sweden he will be sent to the United States to be prosecuted for WikiLeaks’ publication of secret documents, including reams of U.S. diplomatic cables.