In a deal reached by Burundi , Tanzania and the U.N. refugee agency , 1,72,000 of the refugees will be allowed to stay in Tanzania and become citizens .