Thousands of Somali refugees in Kenya have been ordered to leave urban areas and go to remote, overcrowded camps, following a spate of grenade attacks.
Aid will no longer be delivered to those who remain in urban areas, said the head of Kenya's refugee agency.
He blamed the refugees for contributing to insecurity in Kenya.
The attacks have mostly been carried out in areas with a large ethnic Somali population in north-east Kenya and the Eastleigh district of Nairobi.
They are believed to have been carried out by the al-Shabab militant group.
The al-Qaeda-linked group has not commented on the claims.
But al-Shabab had threatened to take revenge over Kenya's decision last year to send troops over the border to help the UN-backed government seize territory from the militants.
All Somali refugees have been ordered to report to the north-eastern Dadaab complex of camps, the world's biggest refugee facility that already house some 500,000 people.
Refugees from other countries have been told to go to Kakuma in the north-west, where some 100,000 people from Somalia, Sudan and South Sudan are living.
More than 30,000 Somali refugees live in Nairobi, the AFP news agency quotes the UN as saying.
"The government of Kenya has decided to stop reception, registration and close down all registration centres in the urban areas with immediate effect," read a statement from Badu Katelo, Kenya's acting commissioner for refugee affairs.
"The refugees, particularly those living in urban centres, are contributing to insecurity in the country."
He also said aid agencies, including the UNHCR, should stop giving assistance to asylum seekers and refugees in Kenya's towns and cities and only provide help in camps.
UNHCR Kenya spokesman Emmanuel Nyabera told the BBC's Focus on Africa programme that the decision could worsen overcrowding in Dadaab and Kakuma.
"Having more people going to the two camps is a challenge and we need to deal with it, working with the Kenyan government," he said.
Medecins Sans Frontieres, which operates health programmes in Dadaab, told the BBC it was already struggling to cope with the vast numbers at in the camp, which was originally designed to shelter 90,000 people.
"We are absolutely overstretched," said MSF's head of mission in Kenya, Elena Velilla.
She said they were currently working in "extreme conditions", with recent flooding worsening already poor sanitation, an outbreak of cholera and hepatitis and a rise in malnutrition in children.
"We have no capacity at all to distribute more aid," said Ms Velilla.
A refugee in Nairobi, Halima Yusuf Ahmed, told the BBC she did not want to live in a camp.
"I have a small tailoring business which enables me to live comfortably, but if they take me back to a camp my life will be destroyed," she said.
"Let those of us who are registered [as refugees] remain in towns."
The latest attack in Eastleigh came on Sunday, when three grenades were thrown at a shop, injuring several people.
Two similar incidents have killed at least 13 people recently, leading to increased tension in Nairobi between ethnic Somalis and other Kenyans.
There have also been mass arrests of ethnic Somalis, particularly after three Kenyan soldiers were shot dead last month in the town of Garissa, not far from Dadaab.
Many ethnic Somalis have always lived in Kenya, while hundreds of thousands of people have fled across the border since Somalia descended into chaos two decades ago.