The Ecuadorian government has cut off Julian Assange's internet connection in its embassy in London.

The WikiLeaks founder has been holed up in the embassy since 2012 after being accused of rape in Sweden.

Ecuador said it did so because Assange's posts on social media risked damaging its relationship with the UK and the EU.

Ecuador has cut off Julian Assange's internet connection in its London embassy — and Wikileaks says it's because of a tweet he sent.

The 46-year-old founder of the publishing platform and anti-secrecy organization WikiLeaks has lived in the embassy in Knightsbridge, London since 2012, when he took refuge there to avoid extradition to Sweden over a rape allegation, which he denies.

Assange maintains that if he were to go to Sweden to answer questions about the allegations against him, he would then be extradited to the US because of his political activities with WikiLeaks.

Last year, Sweden dropped its investigation into the rape allegation — but Assange could still be arrested and charged with breaching the terms of his UK bail if he were to set foot outside the embassy.

Assange's active use of Twitter played a part in the Ecuadorian government's decision to cut off his internet connection. In a statement, the government said it acted to remove Assange's ability to communicate with the outside world because it was concerned that his posts risked damaging Ecuador's relationship with the UK and the European Union.

Meanwhile, the official Wikileaks account said on Twitter that Assange was not able to make phone calls, receive visitors, speak to the press, or send tweets, and that Ecuador was demanding he delete a tweet about the arrest of Catalan politican Carles Puigdemont.

WikiLeaks is fiercely controversial and has repeatedly drawn the ire of the US government for its release of classified documents, including internal memos from US embassies and agencies and, in one case, a video known as "Collateral Murder" showing a US helicopter firing on journalists in Iraq.

In the run-up to the 2016 US presidential election, WikiLeaks released emails and documents taken from the Democratic Party, dominating the news cycle with headlines unfavorable to the Democratic nominee, Hillary Clinton. The US government has said the documents were stolen by Russian hackers and released to undermine faith in the election and destabilize Clinton's candidacy.

Assange's five years of self-imposed captivity have not been easy. WikiLeaks says he has had health problems but has not left to seek treatment for fear of being arrested. His relationship with his Ecuadorian hosts has also been at times strained. Leaked documents obtained by BuzzFeed in 2015 detailed apparent concerns about his psychological health and included photos of a bookcase strewn across his room in 2013.

Ecuador has cut off Assange's internet before. In 2016, it temporarily deactivated his access over concerns that WikiLeaks' releases were interfering in the US presidential election.

Here's the full statement from the Ecuadorian government (in Spanish):