Ecuador's President Rafael Correa said the declaration by the UN panel shows that they were right.
Correa claimed that maintaining security at the embassy has been expensive and there were a lot of spying attempts.
Assange, 44, took refuge in the embassy in 2012 to avoid extradition to Sweden on a rape charge, which he denies.
The UN working group on arbitrary detention is expected to declare on Friday that his three-and-a-half years in the embassy office amount to illegal detention, the Swedish foreign ministry and Assange's lawyers said.
Swedish prosecutors said the ruling had no impact on their investigation into the 2010 rape allegation.
The British government said it would have to arrest Assange if he leaves the embassy as long as a European arrest warrant is in force.
REWIND: Best images in the past 24 hours
'Still guessing why BJP changed its hearts on Dalits'
Avoid Zika-hit nations: IMA warns pregnant women
WikiLeaks founder Assange may surrender on Friday
U-19 World Cup: Will it be an India-Pak semi-final?