By Richard Lough and James Macharia
NAIROBI (Reuters) - Kenya's president told Somalia's leaders on Tuesday to "put their house in order", in a sign of frustration at the festering instability in the neighboring country after members of a Somali militant group attacked a Nairobi shopping mall.
The al Qaeda-linked al Shabaab group said it raided the Westgate center, killing at least 67 people, in revenge for Kenya's military campaign against its fighters inside Somalia.
The attack bore out widespread fears that Somalia, whose cash-strapped government exerts little control beyond the capital Mogadishu, remained a training ground for militant Islam and a launchpad for attacks beyond its borders.
Kenyan President Uhuru Kenyatta said he would not be bullied into withdrawing his soldiers, who are part of an African peacekeeping force.
He also took aim at the Somali government, which a source close to the Kenyan presidency said had also recently called for Kenyan troops to leave before withdrawing the demand under pressure from regional leaders.
"If their desire is for Kenya to pull out of Somalia, my friends, all they need to do is what they should have done 20 years ago, which is put their house in order," Kenyatta told religious leaders at a multi-faith prayer meeting.
There was no immediate reaction from the Somali government.
Mogadishu has been angered by Kenya's perceived close relationship with a former Islamist warlord now in control of Somalia's southernmost region, which borders Kenya.
The Westgate raid was the worst attack in Kenya since al Qaeda bombed the U.S. embassy there in 1998, killing more than 200 people, mostly Kenyans.
Hours after the militants struck, spraying people with bullets and hurling grenades, al Shabaab accused Kenya of turning a deaf ear to repeated warnings to end its military intervention in Somalia.
But Kenyatta said his country had only deployed forces there after tourists and foreign aid workers were targeted in a string of kidnappings on Kenyan soil.
"Let me remind them that it is they who, having had enough of killing themselves in their own country, decided to come and interfere in Kenya," Kenyatta said. "We did not go there, they came here."
"I want to be categorically clear: We will stay there until they bring order in their nation," he added.
Somalia's ambassador to Kenya told Reuters on Friday his country's security agencies were working closely with Nairobi after the mall attack.
(Additional reporting by Matthew Mpoke Bigg and Humphrey Malalo; Writing by Richard Lough; Editing by James Macharia and Andrew Heavens)