Was there a plan to help Julian Assange escape to Russia? Diplomatic credentials might have given Assange immunity.

The latest round in WikiLeaks founder Julian Assange's intensifying drama during the six years he's spent inside Ecuador's embassy in London involves allegations the government in Quito tried to give him diplomatic status last year in a plan to help him flee to Russia.

Documents reviewed and authenticated by ABC News in Quito show that the Ecuadorian government gave Assange diplomatic credentials and diplomatic immunity in order to allow him to leave their London embassy without fear of arrest by British police and take up a post in Russia.

“There was a ministerial agreement to make Assange a diplomat in Moscow,” Paola Vintimilla, an opposition politician in Ecuador who first revealed the Quito files, told ABC News Thursday. “It was days after he received the naturalization.”

But like allegations by special counsel Robert Mueller that WikiLeaks helped the Kremlin's fake internet persona "Guccifer 2.0" distribute embarrassing emails hacked from the Democratic Party in an effort to tilt the 2016 U.S. election in Donald Trump's favor, the truth is difficult to pin down because of denials by Assange's supporters that he planned to flee to Russia.

A Dec. 19, 2017, directive from the Foreign Ministry in Quito, which officials in Quito confirmed, stated that Assange would be posted as a counselor at the Ecuadorian embassy in Moscow. Because the British government would not accept his diplomatic credentials, however, Assange was not able to take up the post.

The documents do not indicate whether Assange knew of the Ecuadorian directive at the time.

As for the diplomatic post in Moscow directed by the ministry in Quito last year, Assange’s lawyer Jennifer Robinson told ABC News Thursday, “The location of a diplomatic posting is a matter for the state of Ecuador.”

How far that alleged plan progressed, and whether it made it beyond a government proposal in Quito, is unclear.

In an exclusive and wide-ranging ABC News interview this week, Fidel Narváez, who became close to Assange over the past six years as Ecuador's London Consul until last July, said he knows nothing of any plans by Quito for Assange to flee to Moscow. He also denied being any sort of middleman in arrangements with the Kremlin, as news reports have claimed.

“I don't have anything to do with anything related to a conversation between Ecuador and Russia regarding anything -- not just Assange. I have never met with a Russian diplomat at all -- at all,” Narváez told ABC News in London this week.

In 2013, Narváez issued fugitive NSA whistleblower Edward Snowden a letter of safe conduct to Ecuador before he got stuck in Moscow -- an effort he undertook with Assange's input.

He described spending more time with Assange than anyone else has spent with the WikiLeaks founder since he was granted asylum there in 2012.

“I can categorically tell you that in my knowledge -- and I think I know what I'm talking about because I've been there for so long -- Ecuador has never, ever considered any kind of smuggling Julian without the agreement of the U.K. That never was an option,” Narváez said.

The U.K.'s Foreign and Commonwealth Office refused to accept Assange's diplomatic credentials last December, Narváez said.

"Certainly, there was an attempt of Ecuador to appoint Julian us as an Ecuadorian diplomat. It's for the Ecuadorian state -- a sovereign state -- to decide who is a diplomat and who will be entitled to a diplomatic passport under immunities that come with it," he said. "The U.K. refused to register him."

Whether or not he was bound for Russia at any point, as the Quito files seem to suggest, Assange’s political asylum inside the embassy may end soon anyway because of a change last year in Ecuador's leadership. Conservatives eager for better U.S. relations are now in charge.

The Ecuadorians took steps to silence Assange in March by abruptly denying his access to the internet, phones and outside visitors other than his lawyers. Ecuador said Assange had made public statements that violated the terms of his asylum, but Narváez said the move was really over WikiLeaks' publishing files embarrassing to Spain and, separately, pressure from the U.S. government.

Narváez said he believes Ecuador was also behind media leaks this month about the alleged plot to get Assange to Moscow, which WikiLeaks and Assange's advisers have denied was ever in the works. The former diplomat said in the ABC News interview that the government of current Ecuadorian President Lenin Moreno is leaking sensational allegations like that in order to build political cover for throwing Assange out of its embassy.

The Moreno government's next move may soon be stripping Assange of Ecuadorian citizenship, granted discreetly last December. That could lead to a final move -- rescinding its diplomatic protection in London, Narváez explained, saying he based such speculation on his own experience and insider sources.

“I'm afraid Ecuador is looking for ways to take the asylum from Julian Assange,” Narváez told ABC News.

“My feeling is that Ecuador is building the case in order to take the nationality away from him as a first step, which will lower the political cost ... if Ecuador surrenders and gives Julian to the British authorities. And Julian will have to face a U.K. judge that's going to put him in custody -- which is to say, given the 'special relationship' that the U.K. has with the U.S., [it will result in] giving Julian to the United States in order to be extradited,” he said.

Ecuadorian government officials did not respond to requests for comment by ABC News on Wednesday and Thursday.

At the U.N. General Assembly on Wednesday, Moreno wouldn't confirm either the alleged escape to Russia plan or whether asylum for Assange will be revoked but described Assange's presence in the London embassy as "a problem," without explaining if he meant solely political or otherwise.

There are no known criminal charges against Assange. But Assange's lawyer has said the risk that the U.S. would attempt to prosecute him over publishing military combat reports from Iraq and Afghanistan, as well as worldwide U.S. diplomatic cables, led him to duck into the Ecuadorian embassy more than six years ago.

At the time, he was out on bail related to a warrant in Sweden stemming from a rape investigation. Assange and his supporters believed American authorities would seek his extradition if he was in British custody. The Swedish inquiry was dropped last year but Assange has remained inside the embassy while his lawyers have renewed their public comments about fears he’ll face extradition to America.

Hanging over Assange, who once hosted a program on Russian state TV network RT, is Mueller’s investigation of Russian interference in the 2016 presidential election. In July, the special counsel secured a federal grand jury indictment of three Russian companies and a dozen Russian individuals for allegedly hacking Democratic Party emails and discussing the timing of the leaks with an outside group. Mueller referred to this group as "Organization-1," which has been identified by sources as WikiLeaks.

Assange and his lawyers have denied having any involvement with Russian state actors. But his animosity toward former Secretary of State Hillary Clinton, whom he once publicly called a "sadistic sociopath," is well-known. Trump, in turn, publicly praised WikiLeaks five times on the campaign trail.

Also on Wednesday, WikiLeaks' official Twitter account -- to the chagrin of some Assange supporters -- posted a Russian-language tweet about last spring's nerve agent attack in Salisbury, U.K., which Prime Minister Theresa May has blamed on Russian military intelligence.

Narváez blasted Ecuador’s efforts to silence Assange's public voice, and called Ecuador's claim that Assange had violated the terms of his asylum "rubbish."

Robinson, Assange's lawyer, recently told ABC News that the conditions have affected her client's health, calling it akin to "solitary confinement."

Narváez said the embassy's security on March 28 had shut off Assange's Internet access and installed spot jammers in the walls to block his cell phone signal, which he maintains has caused health problems for both Assange and embassy staffers.

But a former U.S. intelligence officer who operated similar equipment for decades told ABC News the Ecuadorians are likely not using military-grade jammers powerful enough to cause ill health.

"Even the Ecuadorian diplomats and people working at the embassy, they cannot communicate by phone with [anyone] outside the embassy," Narváez said.

The situation is deplorable for Assange, his Ecuadorian friend insisted.

"The current situation of Julian is outrageous," Narváez said. "It is in detriment of his basic human rights under any standard."

Sean Langan is a British filmmaker and ABC News contributor in London. ABC News digital journalists Ali Dukakis and Ali Pecorin in Washington and Aicha Hammar in Quito contributed to this report.