ECUADOR’S president says his country and the UK are working on a legal solution for Julian Assange that would allow the Wikileaks founder to leave the Ecuadorean Embassy in London in “the medium term.”

President Lenin Moreno told The Associated Press that Assange’s lawyers are aware of the negotiations.

He declined to provide more details because of the sensitivity of the case.

Assange, 47, has been holed up in the embassy for more than six years.

The famous whistleblower and computer engineer faces an arrest warrant in the UK and fears he could be extradited to the US, where high-level officials have spoken about prosecuting him for stealing classified information.

Moreno says his country will seek to protect Assange’s rights.

Meanwhile, WikiLeaks has named one-time spokesman Kristinn Hrafnsson as its new editor-in-chief but the ramifications of the move are unclear.

The organisation was founded and has been led for more than a decade by Assange.

WikiLeaks tweeted that Assange will stay on as the group’s “publisher.”

Assange had his communications cut in March by Ecuador’s new president, and Wednesday’s statement said he remained “incommunicado.”

WikiLeaks’ job titles have proven fluid over the years.

Assange has variously described himself as the group’s spokesman, publisher and editor. Hrafnsson told The Associated Press that it “remains to be seen” whether the change in responsibility would be permanent or temporary.

He hung up when asked further questions, saying he was busy cooking dinner.

Last week a member of Assange’s legal team said the impasse over the WikiLeaks founder could be resolved immediately if the UK Government gave an assurance he would not be extradited to the United States.

Jennifer Robinson told a conference in Barcelona that Assange had been under some form of restrictions on his liberty for almost eight years without ever being charged.

Robinson said: “It is difficult to see how this is going to be resolved because of the politics, though the solution is simple.

“We have used every legal avenue available to us, in the UK and at the UN, to challenge this situation.

“This is and has always been about the risk of US extradition. This case could be resolved tomorrow if the UK would give this assurance.”

Speaking at the World Ethical Data Forum, she added: “For more than eight years we have been fighting a number of landmark cases, in multiple jurisdictions, to protect something we thought was sancrosanct, that perhaps too many have taken for granted: the right to freedom of speech and the freedom of publishers to publish information in the public interest.”

These included the ongoing criminal investigation in the US, which she said was of “unprecedented size and scale”, and the risk of US extradition for Mr Assange, especially as the current US Attorney-General has said prosecuting him was a “priority”.