The WikiLeaks founder Julian Assange was arrested by UK police on Thursday after living in Ecuador's London embassy for nearly seven years.

WikiLeaks had claimed that Assange was spied on in Ecuador's custody, and it promoted a document dump said to implicate Ecuadorian President Lenín Moreno in a corruption scandal.

Assange's relationship with the Ecuadorian government had become strained in recent years over WikiLeaks' release of documents related to international affairs, but only now has Ecuador cut him loose.

Moreno blamed WikiLeaks for the document dump and said the spying allegations "threatened" his country.

Ecuador's former president, who first provided asylum to Assange and under whom Moreno served as vice president, suggested Assange was arrested in retaliation for exposing corruption under Moreno.

Visit BusinessInsider.com for more stories.

The WikiLeaks founder Julian Assange was arrested by British police on Thursday at the Ecuadorian Embassy in London after Ecuador revoked his asylum.

The revocation of asylum and the arrest marked the end of a rocky seven-year relationship between the WikiLeaks founder and his host government that has led to allegations of corruption and retaliation at the highest level of Ecuador's government.

Read more: US asks to extradite Julian Assange after he was arrested and forcibly removed from Ecuador's London embassy

In a video, Ecuadorian President Lenín Moreno said that Assange's mistreatment of embassy staff and facilities as well as WikiLeaks' continued political activity were the primary drivers for ending the asylum.

Assange's arrest also came a day after WikiLeaks claimed that a sophisticated spying operation had targeted him and led to extortion demands, and weeks after it promoted the release of private documents, including personal photos and emails, known as the INA Papers and said to implicate Moreno in a corruption scandal.

"The patience of Ecuador has reached its limit," Moreno said in the video.

Moreno cited WikiLeaks' release of Vatican documents in January as evidence that Assange "violated the norm of not intervening in the internal affairs of other states," adding that the document dump and other activities "confirmed the world's suspicion that Mr. Assange is still linked to WikiLeaks."

Moreno also accused Assange of mistreating the embassy and its staff, saying Assange "installed electronic and distortion equipment," "blocked the security cameras," "confronted and mistreated guards," and "accessed the security files of our embassy without permission."

The small South American country has for years weathered the issues Moreno said led to the end of Assange's asylum. Ecuador previously cut Assange's internet access because of his continued political activities, and its government continually raised concerns about his links to WikiLeaks.

Moreno said WikiLeaks' claim that Assange had been spied on in Ecuador's custody "threatened the government of Ecuador" and wore out his patience for Assange's stay.

The Ecuadorian government has filed complaints against the group, accusing it of promoting leaks of the president's private documents.

Patience worn thin, or retaliation?

Former Ecuadorian President Rafael Correa with Ecuadoran President Lenín Moreno during the inauguration ceremony at the National Assembly in Quito on May 24, 2017. REUTERS/Mariana Bazo

Rafael Correa, Ecuador's president from 2007 to 2017 who accepted Assange's asylum request, claimed in a tweet after the arrest that Assange's asylum was dropped because of the leak of Moreno's information.

"Julian Assange was expelled from the Ecuadorian Embassy for exposing Pres. Lenin Moreno's corruption in the #INAPapers," Correa tweeted.

In his statement, Moreno, who served as Correa's vice president, made it clear that he was dealing with a problem "inherited" from Correa's government.

The combined issues of the allegations of spying and the document dump said to implicate Moreno look like the straws that broke the camel's back and ended a seven-year liability for Ecuador.

Stories about Assange's habits while living in the embassy have circulated for years, and Ecuador's response to his behavior even prompted a legal battle between the WikiLeaks founder and his host.

Assange was arrested on Thursday on an extradition request by the US. The Department of Justice has charged him with conspiracy to hack a government computer.