LONDON- Julian Assange, the WikiLeaks founder who released reams of secret documents that embarrassed the United States government, was taken into police custody on Thursday after being evicted from the Ecuadorean Embassy in London, where he has lived for almost seven years.

The United States Justice Department has filed criminal charges against Mr. Assange, 47, related to the publication of classified documents, a fact that prosecutors accidentally made public in November.

Mr. Assange is also suspected of aiding Russian interference in the 2016 presidential election by releasing material stolen from the computers of the Clinton campaign and the Democratic Party.

Ecuador gave Mr. Assange asylum in 2012, but he has been an irritant in its relations with Britain, the United States and other countries.

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.

Mr. Assange, who was born in Australia, created WikiLeaks as a vehicle for people to publish secret materials anonymously