Julian Assange will face Swedish prosecutors inside the Ecuadorian embassy in London as Ecuador is said to have agreed to allow questioning of the WikiLeaks founder.

The Swedish authorities managed to convince the embassy after they requested them to provide access to Assange last month.

On 18 June he marked the beginning of his fifth year living inside the embassy since he was granted political asylum by Ecuador to avoid extradition. He has reportedly not left the premises since 2012.

According to Press Association, a statement issued in Ecuador said: "In the coming weeks a date will be established for the proceedings to be held at the Embassy of Ecuador in the United Kingdom.

"For more than four years, the government of Ecuador has offered to co-operate in facilitating the questioning of Julian Assange in the Ecuadorian embassy in London, as well as proposing other political and legal measures, in order to reach a satisfactory solution for all parties involved in the legal case against Julian Assange, to end the unnecessary delays in the process and to ensure full and effective legal protection."

He is under probe over a sex allegation, which he has denied. He has long maintained that the allegation is a ploy to get him handed over to the US to be interrogated over his activities related to WikiLeaks if he goes to Sweden.

The statement added that Ecuador wanted Sweden to negotiate an agreement based on "mutual legal assistance in criminal matters, which was signed last December [2015]". The agreement reportedly provides the legal framework for the questioning.

WikiLeaks founder Julian Assange
Julian Assange has long maintained that a sex allegation against him is a ploy to get him extradited to the US for interrogation over his activities related to WikiLeaks if he goes to Sweden Getty Images

The statement said Ecuador's decision was not influenced by the recent criticism from a human rights group, which found that Assange was being "arbitrarily detained" by the country in its embassy in London. The UN Working Group on Arbitrary Detention blamed the UK and Swedish governments and called for the WikiLeaks founder to be released and also be given a compensation for alleged violation of his basic rights.

"Ecuador's foreign ministry reiterates its commitment to the asylum granted to Julian Assange in August 2012, and reaffirms that the protection afforded by the Ecuadorian state shall continue while the circumstances persist that led to the granting of asylum, namely fears of political persecution," the statement added.