QUITO (Reuters) - Ecuador has suspended Julian Assange’s citizenship and accused him and people connected to his WikiLeaks group of collaborating in attempts to destabilize the Andean nation’s government, after years of offering him shelter.

WikiLeaks founder Julian Assange is seen after was arrested by British police, outside Westminster Magistrates Court in London, Britain April 11, 2019. REUTERS/Peter Nicholls

A bearded and frail-looking Assange was arrested by British police on Thursday after Ecuador terminated his asylum at its London embassy, where he had lived since 2012 to avoid extradition to Sweden over a sexual assault investigation.

Assange’s Ecuadorean citizenship was suspended on Wednesday, Foreign Minister Jose Valencia told reporters.

To some, Australian-born Assange is a hero for exposing what supporters cast as abuse of power and for championing free speech. To others, he is a dangerous figure who has undermined the security of the United States and has too many ties to Russia.

WikiLeaks angered Washington by publishing hundreds of thousands of secret U.S. diplomatic cables that laid bare often highly critical U.S. appraisals of world leaders, from Russian President Vladimir Putin to members of the Saudi royal family.

Assange’s lawyer in Quito, Carlos Poveda, told reporters asylum was terminated in reprisal for corruption allegations against President Lenin Moreno and that his life will be in danger if he is extradited to the United States.

Assange was offered refuge in 2012 by Ecuador’s then-president Rafael Correa, but his relationship with Ecuador has soured under Moreno, who has said Assange violated the terms of his asylum.

Assange received Ecuadorean citizenship in January 2018.

Moreno was angered after years-old private photographs of him and his family taken when they lived in Europe circulated on social media. His government said it believed the photos were shared by WikiLeaks.

Ecuador was not aware of any active extradition requests for Assange before it terminated his asylum, Valencia told the national assembly.

“At the time the decision to finalize his asylum was made, there was only a case in the United Kingdom for violating the conditions of his bail in 2012,” Valencia told lawmakers.

U.S. prosecutors unsealed an indictment against Assange on Thursday, accusing him of conspiring with former Army intelligence analyst Chelsea Manning to gain access to a government computer as part of one of the largest compromises of classified information in U.S. history.

Assange faces up to five years in prison on the American charge, the U.S. Justice Department said in a statement.

Assange and WikiLeaks have intervened in Ecuadorean affairs, Interior Minister Maria Paula Romo told reporters in Quito, and at least one Russian hacker involved with the organization is living in the country.

She would not confirm whether the hacker was involved in the creation of web pages that accuse Moreno of corruption, but said they had participated in the creation of a page later spread by WikiLeaks.

“We hope it will be the Ecuadorean justice system which will confirm the exact relationship,” Romo said.

Romo on Thursday night said Ecuador had detained a person “very close” to WikiLeaks who is associated with former Ecuadorean foreign minister Ricardo Patino.

“(The person) was detained this afternoon while attempting to travel to Japan,” said Romo, without providing the person’s name or nationality.

Earlier she had said that Patino, who was serving under Correa when Assange was granted asylum, was seeking to destabilize the government.

Patino denied the allegations.

Romo “just invented a story about a supposed relationship of mine with Russian hackers,” Patino said on Twitter. “The only thing left is for her to say where we left Red Riding Hood and Sleeping Beauty.”