QUITO (Reuters) - Ecuador in 2017 gave Wikileaks founder Julian Assange a diplomatic post in Russia but rescinded it after Britain refused to give him diplomatic immunity, according to an Ecuadorean government document seen by Reuters.

The aborted effort suggests Ecuadorean President Lenin Moreno had engaged Moscow to resolve the situation of Assange, who has been holed up in the Ecuadorean embassy for six years to avoid arrest by British authorities on charges of skipping bail.

The incident was revealed in a letter by Ecuador’s foreign ministry to a legislator who had asked for information about Ecuador’s decision last year to grant Assange citizenship.

Ecuador last Dec. 19 approved a “special designation in favor of Mr. Julian Assange so that he can carry out functions at the Ecuadorean Embassy in Russia,” according to the letter written to opposition legislator Paola Vintimilla.

“Special designation” refers to the Ecuadorean president’s right to name political allies to a fixed number of diplomatic posts even if they are not career diplomats.

But Britain’s Foreign Office in a Dec. 21 note said it did not accept Assange as a diplomat and that it did not “consider that Mr. Assange enjoys any type of privileges and immunities under the Vienna Convention,” reads the letter, citing a British diplomatic note.

Ecuador abandoned its decision shortly after, according to the letter.

British authorities have said they will arrest Assange if he leaves the embassy, meaning he would have needed to be recognized as a diplomat in order to travel to Moscow.

Lawyers for Assange in the United States and Britain did not respond to requests for comment. WikiLeaks website did not respond to an email seeking comment. The Ecuadorean foreign ministry could not be reached for comment.

FILE PHOTO: WikiLeaks founder Julian Assange is seen on the balcony of the Ecuadorian Embassy in London, Britain, May 19, 2017. REUTERS/Peter Nicholls

The plan to make Assange an Ecuadorean diplomat was made public last year, but the effort to send him to Moscow has not been previously reported.

U.S. intelligence agencies in 2017 said they believed WikiLeaks was an intermediary used by Russia to publish emails hacked from top Democrats to embarrass 2016 Democratic presidential candidate Hillary Clinton.

U.S. President Donald Trump faces an investigation into whether his campaign colluded with Russia to win that election. Assange denies receiving the emails from Russia, but has not ruled out having obtained them from a third party. Trump and Russia deny collusion.

The Guardian newspaper on Friday reported that Russian diplomats held secret talks in London to help Assange flee Britain through an operation tentatively scheduled for Christmas Eve, 2017.

The story, which cited unidentified sources, said “details of the plan were sketchy” and that it was aborted because it was deemed too risky.

“The Embassy has never engaged either with Ecuadorian colleagues, or with anyone else, in discussions on any kind of Russia’s participation in ending Mr Assange’s stay within the diplomatic mission of Ecuador,” Russia’s embassy in London wrote on its web site in a response to The Guardian story.

It was not immediately evident if Ecuadorean officials had any contact with Russia as part of the Assange appointment.

Reuters was unable to obtain comment from Russia’s foreign ministry on Ecuador’s plan to make him a diplomat there.

The letter from Ecuador’s foreign ministry was a summary of 28 documents that were sent to Vintimilla in response to her request.

Among those documents is a Dec. 4 letter from Assange in which he renounced his request for political asylum from Ecuador in preparation to become an Ecuadorean diplomat. The letter, which was seen by Reuters, said he ultimately planned to travel to Ecuador.

Vintimilla, who discussed some of the documents during a Thursday press conference, said Assange should lose his citizenship as a result of that letter.

Assange sought asylum in 2012 to avoid extradition to Sweden to face questions about allegations of sex crimes, accusations that were later dropped.

Ecuador’s president Moreno has said Assange’s asylum cannot be eternal, but has also been reluctant to abruptly halt it on concerns that Assange’s human rights could be at risk.

(Refiles to erase garble at top.)