Hungary's parliament has approved a new law calling for all asylum seekers to be detained in camps along the country's southern border while their applications are being processed.
Under the measure passed Tuesday, migrants will be kept in converted shipping containers, and will not be allowed to leave unless they choose to go into Serbia.
The U.N. refugee agency says it is deeply concerned about the new law, saying international and EU laws state asylum seekers can only be detained when doing so is "necessary, reasonable and proportionate."
Hungary has resisted efforts for EU members to take in a share of the hundreds of thousands of migrants who have arrived in the past few years. The government says its position is necessary to protect national security and European culture and identity.
UNHCR spokesperson Cecile Pouilly says the new law "will have a terrible physical and psychological impact on women, children and men who have already greatly suffered."