WikiLeaks' founder, Julian Assange, was dramatically arrested and carried out of the Ecuadorian Embassy in London on Thursday.

British and Ecuadorian authorities engineered the timing and nature of the raid to stop Assange from accessing a panic button he mentioned in the past, Ecuador's foreign minister said.

Specifics on the button — or what it might do — are sparse, but the foreign minister said Assange had said it could bring dire consequences for Ecuador.

Ecuadorian officials have accused Assange of accessing the government's security files, playing music loudly, and having no regard for personal hygiene during his stay at the embassy.

Visit BusinessInsider.com for more stories.

Julian Assange's arrest at the Ecuadorian Embassy in London was carried out in a specific way to prevent him from pressing a mysterious panic button he said could bring dire consequences for Ecuador, its foreign minister said.

The WikiLeaks founder was carried out of the Ecuadorian Embassy in London's Kensington district on Thursday morning by a group of British police officers. Ecuador had earlier revoked his political asylum, alleging repeated bad behavior during his almost seven-year stay.

During this stay, Assange is accused of threatening Jaime Merchan, the Ecuadorian ambassador to the UK, with activating some kind of panic button that would bring down the embassy if he were arrested or felt in danger.

The claim was made by Ecuador's foreign minister, José Valencia, in a speech Thursday to the country's National Assembly, according to the Associated Press and Reuters.

Assange leaving a London police station after his Thursday arrest. Peter Nicholls/Reuters

Assange had said the button would bring "devastating consequences," the AP reported, in a summary of Valencia's remarks.

It is not clear exactly what form the "panic button" took: whether it was a physical device or a metaphor for some other easily activated insurance measure. It is also unclear what leverage Assange thought he had over Ecuador.

Assange's lawyer did not immediately respond to a request for comment from Business Insider on the nature of the button and whether it existed. According to Valencia, though, it was serious enough for Ecuador to warn British authorities and carry out the raid in such a way that Assange was not able to get back into his room after learning of his imminent arrest.

Ecuador granted Assange asylum in June 2012, when he was trying to evade warrants for his arrest in Sweden and the UK.

He had failed to appear in court to face charges of sexual assault in Sweden, which he denies. He was also wanted in the UK for breaching prior bail conditions.

A police van outside the Ecuadorian Embassy in London after Assange's arrest. Peter Nicholls/Reuters

'We've ended the asylum of this spoiled brat'

Ecuador's president announced the removal of Assange's asylum in a Thursday video statement, saying Ecuador's patience had "reached its limit on the behavior of Mr Assange."

"We've ended the asylum of this spoiled brat," he said in a separate speech hours after Assange's arrest, according to the AP.

President Lenín Moreno said Assange breached the conditions of his stay by installing prohibited electronic equipment in the embassy. Moreno said Assange also mistreated security guards and accessed the embassy's security files during his stay.

The Ecuadorian government also told Assange in a memo that he deliberately pointed a studio lamp at a security camera in a room where he received guests, according to government memos released by the WikiLeaks founder's supporters in February.

Assange greeting supporters at the Ecuadorian Embassy in May 2017. Associated Press

Ecuador's troubles with Assange went beyond security concerns.

Officials have accused Assange of being unhygienic and said his skateboarding ruined their floors. Last year it issued a nine-page memo telling him to clean up after his cat.

María Paula Romo, Ecuador's interior minister, said Thursday that Assange had been "allowed to do things like put feces on the walls of the embassy and other behaviors of that nature," according to Reuters.

Ecuadorian authorities deemed this behavior, which they said happened at least once, an act of defiance and disrespect to his hosts, the AP reported. Assange's lawyer attributed it to "stomach problems," Reuters reported.

Read more: The weirdest anecdote about Julian Assange claims that he doesn't like cutlery and eats hot food like jam pudding with his hands

A graphic showing Assange's living area at the embassy. GraphicNews

In a separate memo, Merchan, the ambassador, also sent Assange complaints that he was playing the radio loudly while meeting visitors — which "disturbed the work being carried out by the embassy."

The government said it spent $6.2 million on his upkeep and security from 2012 to 2018.

Ecuador's expulsion of Assange also comes amid a protracted political dispute within the Latin American country.

His ouster comes after years of international and domestic political wrangling between Moreno and his predecessor, Rafael Correa, who granted Assange asylum in 2012.

Moreno has also accused WikiLeaks of being behind an anonymous website that said Moreno's brother created offshore companies to fund his family's luxurious lifestyles in Europe while Moreno was working there for the UN, Reuters reported.

Read more: This simmering political clash may have led to Julian Assange's ouster from Ecuador's embassy

The US on Thursday requested Assange's extradition, charging him with conspiracy to hack classified US government computers, in a document naming the US Army intelligence analyst Chelsea Manning.

He was also convicted of breaching bail conditions in the UK.