Ecuador went as far as appointing Julian Assange to a diplomatic position at its embassy in Moscow as part of its failed plan to get him out of the UK, the Guardian has learned.

The WikiLeaks founder was named as a councillor in Ecuador’s embassy to Russia on 19 December 2017, just days after he was granted Ecuadorean citizenship as part of the aborted escape plan revealed by the Guardian last week. However, the nomination was later withdrawn after the UK refused to recognise his diplomat status.

A classified document signed by Ecuador’s then-deputy foreign minister José Luis Jácome appeared to corroborate information from multiple sources that Russia would have been the ultimate destination for Assange if the plan had been successful.

The involvement of Russia – a country from where Assange would not be at risk of extradition to the US – raised new questions about his ties to the Kremlin.

Assange, who has not left Ecuador’s London embassy since seeking asylum there in August 2012, has been a key figure in the ongoing US criminal investigation into Russia’s attempts to sway the outcome of the 2016 presidential election.

Classified documents, including the agreement to make Assange an adviser, have been seen by the Ecuadorean politician Paola Vintimilla, who will seek to have them declassified in a plenary session of Ecuador’s national assembly on Thursday.

“There was a ministerial agreement to make Julian Assange an adviser in the [Ecuadorean] embassy in Moscow,” Vintimilla told the Guardian.

Ecuadoran right-wing congresswoman Paola Vintimilla speaks during an interview in Quito. Photograph: Rodrigo Buendia/AFP/Getty Images

“It was just days after he was given [Ecuadorean] citizenship and they asked the British government to approve his diplomatic status,” she said.

The stumbling block was the UK’s refusal to grant Assange diplomatic protection. Ecuador made two requests in the last week of December 2017, both of which the UK turned down, according to the documents.

On 29 December, Ecuador withdrew Assange’s diplomatic appointment to Moscow. The operation to extract Assange was provisionally scheduled for Christmas Eve in 2017, one source told the Guardian.

Vintimilla said another document lifted Assange’s asylum status – which would have been a first step to his appointment as an Ecuadorean diplomat. The agreement was signed on 4 December 2017 – a week before the Australian was granted Ecuadorean citizenship. It was signed and witnessed by the Spanish judge Baltasar Garzón, who has acted as a legal adviser to Assange.

In May, Ecuador’s president, Lenín Moreno, said that he had delegated all decisions about Assange to the then-foreign minister María Fernanda Espinosa, now the head of the United Nations general assembly. Moreno has previously described Assange’s situation as “a stone in his shoe”.

“He washed his hands,” Vintimilla said, adding that Espinosa had bent the rules for Assange. Just days before Assange’s citizenship was granted, laws were changed to allow those living under the country’s international protection to obtain citizenship.

Moreno, speaking on the sidelines of the UN general assembly on Wednesday, said that Ecuador and the UK were working on a legal solution that would allow Assange to leave the Ecuadorian embassy in London in “the medium term”. He gave no further details.

The Russian embassy in London denied any involvement in an escape plan for Assange in a letter published in the Guardian on Monday.