QUITO (Reuters) - WikiLeaks founder Julian Assange said on Monday that Ecuador is seeking to end his asylum in its London embassy and hand him over to the United States, but a judge rejected his lawsuit over embassy living conditions.

FILE PHOTO: WikiLeaks founder Julian Assange is seen on the balcony of the Ecuadorian Embassy in London, Britain, May 19, 2017. REUTERS/Peter Nicholls/File Photo

Assange spoke from the embassy via teleconference at a hearing in Quito of a lawsuit challenging the Ecuadorean government requiring him to pay for medical bills, phone calls and clean up after his pet cat.

He took refuge in the embassy six years ago to avoid extradition to Sweden in a sexual assault case that was later dropped. He remains there to avoid being jailed by Great Britain for violating the terms of his bail, which he has said would result in his being handed over to Washington.

During the hearing, Assange said the new rules were a sign Ecuador was trying to push him out, and said Ecuadorean President Lenin Moreno had already decided to end his asylum but had not yet officially given the order.

“If Mr. Assange wants to stay and he follows the rules ... he can stay at the embassy as long as he wants,” said Attorney General Inigo Salvador, adding that Assange’s stay had cost the country $6 million.

Foreign Minister Jose Valencia declined to comment on Assange’s assertion that Ecuador sought to hand him over to the United States.

Judge Karina Martinez rejected the lawsuit, saying the Foreign Ministry was in charge of determining his living conditions.

Assange’s legal team said it immediately appealed the ruling.

Embassy staff had complained of Assange riding a skateboard in the halls, of playing soccer on the grounds and behaving aggressively with security personnel.

Ecuador’s government also objected to his making online commentary about sensitive political issues in other countries, including publishing opinions about the Catalonia separatist movement in Spain.

The new rules were meant to address these concerns, Salvador said.

The United Kingdom in August had assured Assange that he would not be extradited if he left the embassy, Salvador told reporters last week.

Valencia told Reuters last week that the government was “frustrated” by the lawsuit and that it would no longer intervene with British authorities on Assange’s behalf.

U.S. federal prosecutors in Alexandria, Virginia, have maintained a long-running grand jury investigation into WikiLeaks, which according to one source includes a probe into leaks of Central Intelligence Agency documents to the website. (reut.rs/2z8JdlY)