Alan Duncan, the minister responsible for Europe and the Americas at Britain’s Foreign Office, said in a statement that the arrest had followed “extensive dialogue” between the two countries.Paul Manafort, the former Trump campaign manager who has since been convicted of financial crimes, reportedly offered in 2017 to help Ecuador hand Mr. Assange over to American authorities, but the deal was never struck.In December, 2017, Ecuador gave Mr. Assange citizenship, and was preparing to appoint him to a diplomatic post in Russia, but the British government made clear that if he left the embassy, he would not have diplomatic immunity.The Ecuadorean government said in March last year that it had cut off Mr. Assange’s internet access, saying that he had violated an agreement to stop commenting on, or trying to influence, the politics of other countries. The government also imposed other restrictions on him, limiting his visitors and requiring him to clean his bathroom and look after his cat.He sued the Ecuadorean government in October, claiming that it was violating his rights.Mr. Assange, who was born in Australia, created WikiLeaks as a vehicle for people to publish secret materials anonymously. It gained enormous attention in 2010, releasing troves of classified United States documents and videos about the wars in Afghanistan and in Iraq, and confidential cables sent among diplomats.The files documented the killing of civilians and journalists and the abuse of detainees by forces of the United States and other countries, as well as by private contractors, and it aired officials’ unvarnished, often unflattering views of allies and of American actions. It also revealed the identities of people working with coalition forces in Iraq and Afghanistan, which United States officials said put their lives at risk.An Army private, Bradley Manning — now known as Chelsea Manning — was convicted of leaking that collection of files and was sentenced to 35 years in prison, but President Barack Obama commuted the sentence after Ms. Manning had served almost seven years.