The governments of Sweden and Ecuador have reached an agreement that paves the way for Wikileaks founder Julian Assange, currently living in the Ecuadorian Embassy in London, to be questioned by Swedish officials over a long-standing rape allegation.

Swedish Justice Ministry official Cecilia Riddselius told AFP: "This is essentially a deal on legal assistance on a criminal matter, and when it is finalised later this week it will open the door for the Swedish state prosecutor to question Mr Assange."

She also claimed that the new agreement was not specifically linked to Assange's case, and would generally help both countries work more closely together on criminal cases.

A statement from Ecuador's foreign ministry said the agreement would facilitate the "fulfillment of judicial matters," such as the questioning of Assange, who has not left the embassy in Knightsbridge since June 2012.

Assange fears that if he leaves the embassy, he will be extradited to the US to be put on trial for Wikileaks' leaking of thousands of secret military and diplomatic documents in 2010.

Swedish police want to speak to Australia-born Assange, 44, over a count of "lesser-degree rape", which he is alleged to have committed during a visit to the country in August 2010.

Two less serious allegations against Assange which were related to sexual offences against two women were dropped in August this year, after the statute of limitations expired.

However, he continues to be wanted for questioning for the lesser-degree rape charge, as the statute of limitations will not expire until 2020. Assange denies all the allegations against him, and says any sexual encounters with the women were consensual.

In March this year, Swedish prosecutors announce they would be willing to interview Assange in the UK, despite their previous insistence that he should face questioning in Sweden.