QUITO/LONDON (Reuters) - Ecuador has given citizenship to Julian Assange as part of its efforts to allow the WikiLeaks founder to leave the country’s London embassy where he has been holed up for more than five years.

Ecuador made the move hours after the British government refused a request from the South American nation for Assange to be given diplomatic status, which could give him immunity from arrest should he try to leave the embassy.

After a year in which Ecuador’s president has spoken out against Assange, Ecuador’s Foreign Minister Maria Fernanda Espinosa said she hoped to find a solution to his dilemma.

“Ecuador is currently exploring other solutions in dialogue with the UK, like good offices of renowned authorities, other states, or international organizations that could facilitate a just, final and dignified solution for all parties,” Espinosa told a press conference in Quito.

Britain saw only one resolution to the diplomatic standoff.

“Ecuador knows that the way to resolve this issue is for Julian Assange to leave the embassy to face justice,” said a British Foreign Office spokesman.

Assange’s U.S. lawyer Barry Pollack had no comment.

“RISKS TO HIS LIFE”

Assange has been living in the red-brick embassy in Knightsbridge, London since he was granted asylum there in 2012 to avoid extradition to Sweden for questioning in a sexual molestation case.

Slideshow ( 4 images )

Swedish prosecutors dropped their probe into the allegations but British police said Assange would be arrested for breaching bail conditions should he leave the building.

Assange, who denies the allegations, believes Sweden would hand him over to the United States to face prosecution over WikiLeaks’ publication of thousands of classified military and diplomatic documents in one of the largest information leaks in U.S. history.

“There are well-founded fears we have about possible risks to his life and integrity, not necessarily by the UK but by third party states,” Espinosa said.

She did not give details on how granting Assange citizenship might help him leave the embassy and avoid arrest.

Ecuador’s left-wing president Lenin Moreno, who took office in May, has been less friendly toward Assange than his predecessor Rafael Correa.

Moreno last year said Assange could stay in the embassy but called him a “hacker” and warned him not to intervene in the politics of countries friendly to Ecuador.

For some, Assange is a cyber hero for exposing government abuses of power and championing free speech but to others he is a criminal who has undermined the security of the West by exposing secrets.

WikiLeaks disclosed emails that led to embarrassing media coverage for Democratic Party candidate Hillary Clinton. U.S. intelligence agencies believe Russian military intelligence used WikiLeaks and other sites to release the emails it hacked from the Democratic National Committee and top Democrats. Assange said he does not know the source of the emails.

Slideshow ( 4 images )

Assange faces both criminal and congressional investigations in the United States.

There is no evidence at this point that U.S. authorities have filed any charges against him, including secret charges, but CIA Director Mike Pompeo last year called WikiLeaks a “hostile intelligence service.”

U.S. Attorney General Jeff Sessions, responding to a reporter’s question in April about whether arresting Assange was a priority, said it was.

“Whenever a case can be made, we will seek to put some people in jail,” Sessions said at a press briefing.

(This version of the story was refiled to correct bylines)