WikiLeaks on Wednesday announced Icelandic investigative journalist Kristinn Hrafnsson would take over from founder Julian Assange as editor-in-chief.

Assange will continue to be the publisher of WikiLeaks, a not-for-profit organization that publishes classified documents provided by anonymous sources.

WikiLeaks said a new editor-in-chief had been appointed due to the "extraordinary circumstances" of Assange having been held in the Ecuadorian Embassy in London without any contact for six months aside from his lawyers.

Hrafnsson said he condemned Assange's treatment

Read more: Julian Assange: Five years without sunlight

Hrafnsson was a spokesperson for WikiLeaks from 2010–2016, and has since overseen certain legal projects for WikiLeaks, the organization said.

"I condemn the treatment of Julian Assange that leads to my new role," Hrafnsson said in a statement. "But I welcome the responsibility to secure the continuation of the important work based on WikiLeaks ideals."

Ecuadorian President Lenin Moreno said Wednesday that Ecuador and Britain are working on a legal solution for Assange to allow him to leave the Ecuadorian Embassy in London in "the medium term."

Moreno told The Associated Press news agency that Assange's lawyers were aware of the negotiations, but declined to provide further information due to the sensitivity of the case.

Ecuador granted Australian-born Assange asylum in August 2012 after he sought refuge in the embassy to avoid extradition to Sweden over allegations of sexual assault and rape, which he denied.

Assange said Sweden would eventually extradite him to the United States to face prosecution for WikiLeaks' publication of leaked classified military and diplomatic documents.

Although Sweden dropped the case in May 2017, Assange could still be arrested by UK authorities for breaching the conditions of his bail agreement.

Earlier this year, Ecuador said it had granted Assange citizenship.