Kenya's interior minister has sacked 15 immigration officers as investigations into the Westgate mall siege continue.
Joseph Ole Lenku said the officials had endangered national security by issuing ID documents to illegal immigrants.He also said the government would start repatriating Somali refugees to prevent further attacks.
At least 67 people died when militants from the Somali Islamist al-Shabab group attacked the Nairobi shopping centre last month.
Kenya is host to the largest refugee camp in the world, Dadaab - home to about half a million people - near the Somali border, while it is believed that more than 30,000 Somali refugees live in the Kenyan capital, Nairobi, alone.
'Welcomed with open arms' Mr Lenku said the sacked immigration officers would appear in court to face the law.
“Start Quote
Mohamed Ali Nur Somali ambassador to KenyaThese refugees who are in the camps are innocent people. I want to say that the refugees themselves have been victims”
The government would also be
carrying out a thorough audit of identity cards and passports issued in
the country in the last two years, he said.
"We have welcomed with open arms, refugees fleeing from insecurity in neighbouring countries but we won't allow them to harm us," he added in his address to journalists in Nairobi.
"Because of the returning calm in some parts of the Federal Republic of Somali, the process of repatriating Somali refugees has started," he said.
Kenya has about 4,000 troops in the south of Somalia as part of the UN-backed African Union force which has made significant advances against al-Shabab in the last two years, recapturing the area's main cities.
But the militants still control many smaller towns and large rural areas of southern Somalia.
The BBC's Gabriel Gatehouse in Nairobi says this is not the first time those fleeing the violence in neighbouring Somalia have been thrust uncomfortably into the spotlight.
Even before Westgate, some politicians had blamed elements in the country's Dadaab refugee camp for attacks inside Kenya, he says.
Previous attempts to repatriate Somali refugees have met with strong resistance, both from the UN and Kenya's own courts, our reporter adds.
But more than a month after the attack on the shopping mall, the Kenyan government is under pressure - both its handling of intelligence and its response to the attack itself have been called into question, he says.
Somalia's envoy to Kenya, Mohamed Ali Nur, has warned against blaming the refugees.
"These refugees who are in the camps are innocent people. I want to say that the refugees themselves have been victims. Some of them were killed, some women were raped, and kids were killed," Kenya's Daily Nation newspaper quoted him as saying on Tuesday.
Al-Shabab, which is part of the al-Qaeda network, is banned as a terrorist group by both the US and the UK and is believed to have between 7,000 and 9,000 fighters.
Its members are fighting to create an Islamic state in Somalia and the group said it had staged the Westgate attack in response to Kenya's presence on Somali territory.
Officials initially said 10 to 15 gunmen were involved, but CCTV footage appears to show only four militants, who the Kenyan military say all died by the end of the siege.
The BBC's Newsnight programme has revealed that one of the four attackers is suspected of being a 23-year-old Somalia-born Norwegian national, Hassan Abdi Dhuhulow.