QUITO, Ecuador – The relationship between WikiLeaks founder Julian Assange and the Ecuadorians who granted him asylum had the ups and downs of a telenovela.
Once close allies, the silver-haired Australian and leaders of the South American nation grew increasingly embittered as feuds emerged over everything from his alleged meddling in the nation's foreign affairs to the hygiene of his cat.
They finally broke for good on Thursday when President Lenin Moreno allowed British authorities to forcibly remove Assange from Ecuador's small embassy in a tony part of London.
How did their diplomatic liaison take such a dark turn?
Ecuador emerged a safe haven for Assange in 2012 as his legal options to evade extradition to Sweden over sex crime accusations dried up in the United Kingdom. On a June day, he moved into the small country's embassy near the upscale Harrods department store for what most thought would be a short stay.
Instead, the cramped quarters, where a small office was converted into a bedroom, became a permanent address that some likened to a de facto jail.
At the time, Ecuador was governed by Rafael Correa, a leftist with an anti-United States bent who championed the cause of Assange, who had infuriated Washington by publishing a vast trove of confidential U.S. government documents on his WikiLeaks site.
For Correa, granting Assange asylum allowed him to stake a moral high ground, associating himself with a man whose followers see him as a digital-age Robin Hood crusading against big governments and corporations, even as the president faced accusations of clamping down on human rights back home.
"Welcome to the club of those who are persecuted!" Correa said during a televised interview with Assange before the asylum bid.
The embassy has just a few rooms and Assange's new home was far from luxurious. Stuck inside, he used a treadmill to stay in shape, sat beneath a sun lamp to compensate for the lack of natural light and received both visitors and pizza deliveries.
The roster of guests at No. 3 Hans Crescent included stars like Lady Gaga and Pamela Anderson.
"It's not quite the Hilton," Gavin MacFayden, a supporter and investigative journalism school director, said in the early months of Assange's stay.
Assange's mother expressed concerns about her son's health, but the creator of the online whistle-blowing organization remained steadfast in staying.
"While this immoral investigation continues, and while the Australian government will not defend the journalism and publishing of WikiLeaks, I must remain here," he said in a rare address outside the embassy about six months into his residence.
The first major public squabble with Ecuadorian officials came four years later, in 2016, when Ecuador's government cut off his internet access after WikiLeaks published a trove of damaging emails from Hillary Clinton's presidential campaign.
In targeting Clinton, Assange may have run up against Correa's own preference for the Democratic candidate and his effort to repair testy relations with Washington. WikiLeaks accused Ecuador of bowing to pressure from then-U.S. Secretary of State John Kerry, a charge it denied.
A year later, Assange emerged as a thorn in Ecuador's side again.
During the country's 2017 presidential election, the activist's protracted embassy stay became a campaign issue. Conservative banker Guillermo Lasso said he'd evict him within 30 days if elected. Lenin Moreno, Correa's hand-picked successor, said he'd let him stay — and narrowly won.
Following the vote, Assange took to Twitter to take a jab at Lasso.
"I cordially invite Lasso to leave Ecuador within 30 days (with or without his tax haven millions)," he wrote, alluding to allegations the banker had money abroad.
The remarks rattled Moreno, who warned Assange to stay out of the country's politics.
Within months of taking office, Moreno's government scolded Assange again for meddling in international affairs by voicing his support for Catalan secessionists from the Ecuadorian Embassy. Relations grew so prickly that a year later, Ecuador imposed a stricter set of rules outlining what he could and couldn't do inside the embassy.
Under the new protocol, Assange would have to pay for his internet and clean up after his cat, an evident source of tension between both sides. The rules said that if the feline wasn't properly fed and cleaned up after, it would be sent to the pound.
Assange tried challenging the restrictions in court, to no avail.
Correa said Thursday he thinks the final straw for Moreno was WikiLeaks' decision to spread information about a purported offshore account controlled by the president's brother. Personal photographs of Moreno lying in bed, as well as images of close family members dancing, were also leaked, incensing him.
Correa, who has had a very public falling out with Moreno, accused him of acting "cowardly."
"This will never be forgotten by all of humanity," Correa wrote on Twitter.
Interior Minister María Paula Romo said Assange's behavior had become intolerable, and accused him even of spreading fecal matter on embassy walls. In a video shared on Twitter, Moreno described Assange as "discourteous and aggressive."
"The patience of Ecuador has reached its limit," he said.
Moreno was also likely under increasingly U.S. pressure to surrender Assange, though he said Thursday that he had only made his decision after Great Britain guaranteed he would not be extradited "to a country where he could face torture or the death penalty."
Shortly after Moreno's election, President Donald Trump's former campaign chairman Paul Manafort, traveled to Quito in the company of Chinese investors. Moreno's aides said that Assange's name never came up and the visit, which was first revealed in U.S. court documents.
But some have speculated it was the start of backchannel coordination between U.S., Ecuadorian and U.K. officials, and it was followed months later with a rare visit to Quito by Vice President Mike Pence, who has since become one of Moreno's biggest boosters.
Pence said that he discussed Assange with Moreno during his visit but provided no details.
On the streets of Ecuador's capital, some rejoiced that they'd no longer be seeing Assange's face pop up so frequently in the nation's headlines.
"It's good they've thrown him out," said Manuel Benavides, a designer. "He's ungrateful and arrogant. You can't bite the hand that has fed you all these years."
Armario reported from Bogota, Colombia.
Follow AP's coverage of the arrest of WikiLeaks' founder Julian Assange here: https://www.apnews.com/WikiLeaks