Kenya on Tuesday restricted all refugees on its soil to two designated camps in the wake of a weekend attack on a church near Mombasa that claimed six lives.
Kenyans were asked to report any refugees or illegal immigrants outside the overcrowded camps - Dadaab in the east and Kakuma in the north-west - to the police.
“Any refugee found flouting this directive will be dealt with in accordance with the law,” Interior Minister Joseph Ole Lenku said in a statement.
Sunday's attack, in the Likoni district near Mombasa, came amid heightened warnings of a threat of Islamist violence in Kenya despite boosted security in major cities.
There was no immediate claim of responsibility, but Kenya has been hit by a series of attacks since sending troops into southern Somalia in October 2011 to battle the al-Qaeda-linked al-Shabaab insurgents.
The latest attack also came just days after police arrested two men with a vehicle stashed full of large quantities of powerful explosives prepared in pipe bombs, which experts said would have been strong enough to bring down a major building.
Ole Lenku said 500 extra police would be deployed in the capital Nairobi as well as Mombasa, Kenya's second city.
Refugee registration centres in main cities will be closed, the statement said.
The two camps are known for being remote and overrun with refugees.
Dadaab, where people often live in appalling conditions, is home to more than 400 000 mainly Somali refugees.
Kakuma, a vast desert settlement, is home to more than 125 000 refugees from across the region, including Somalia.
Kenya, where Islamist commandos attacked Nairobi's Westgate shopping mall last September, leaving 67 dead, stepped up defences around the capital's airport in February amid “increased threats of radicalisation” from homegrown Islamist extremists.
The country had previously ordered all asylum seekers and refugees to report to the Dadaab and Kakuma camps in December 2012, after a spate of attacks in the northeast and in Nairobi that included several blasts in the capital's largely ethnic-Somali Eastleigh neighbourhood.
Somalia remains riven by war but some areas are more stable, with a 17 000-strong African Union force - including Kenyan troops - wresting a series of towns from the al-Shabaab in recent years.
Meanwhile in Kenya, rights groups have accused police in the past of a brutal campaign against Somali refugees, following a string of grenade attacks and shootings blamed on supporters or members of the al-Shabaab. - Sapa-AFP