* Kenya frustrated by insecurity in neighbour Somalia
* Troops staying in Somalia until order restored - Kenyatta
* Militants killed at least 67 people in Westgate raid (Adds Shabaab's new warning of attacks in Kenya)
By Richard Lough and James Macharia
NAIROBI, Oct 1 (Reuters) - Kenya's president told Somalia on Tuesday to "put their house in order," in a sign of frustration at the festering instability in the neighbouring country after members of a Somali militant group attacked and killed dozens at a Nairobi shopping mall.
The al Qaeda-linked al Shabaab group said it raided the Westgate mall, killing at least 67 people in a four-day siege, in revenge for Kenya's military campaign against its fighters inside Somalia.
Al-Shabaab repeated its warnings to Kenya on Tuesday of new attacks if it did not pull troops from Somalia.
The mall 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 launching pad 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.
Mogadishu, in turn, 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.
There was no immediate reaction from the Somali government.
But al Shabaab said in a statement that if the Kenyan government's decision was to keep its forces in Somalia, it was an indication that it hadn't yet learned "any valuable lessons" from the Westgate attack.
The group promised even more insecurity, bloodshed and destruction in Kenya.
"Harakat Al-Shabaab Al-Mujahideen is fully determined to intensify attacks inside Kenya until the last KDF boots exit Somali soil," the insurgent's press office said.
"If Kenya's political leaders are still persistent in their quest to occupy our Muslim lands and carry out heinous atrocities against our people, then let them know that Kenyans will never find peace and stability in their country."
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.
Kenya's government has said it is "at war" with Islamist militants who attacked the Nairobi shopping mall.
But with its security services on high alert, some Kenyans have said they were worried that the government may have failed to act on prior intelligence information, and they said the latest threat by the militants could cause even more anxiety. (Additional reporting by Matthew Mpoke Bigg and Humphrey Malalo in Nairobi and Feisal Omar in Mogadishu; Writing by Richard Lough and James Macharia; Editing by Philip Barbara)