The United Nations refugee agency has closed its office in the Timor-Leste capital, Dili, after more than 12 years, a move hailed by national leaders as a sign that the country had overcome most of the humanitarian problems it has faced in its recent history.