UPDATE 2-Somali rebels dig in defences in Afmadow
* Al Shabaab digging trenches, tunnels
* Warplanes swoop over rebel stronghold
* Militants have threatened major retaliation in Kenya (Adds Kenya/Somalia meeting, Mogadishu blast)
By Sahra Abdi and Ibrahim Mohamed
MOGADISHU, Oct 18 (Reuters) - Residents fled the Islamist-held town of Afmadow in southern Somalia on Tuesday and al Qaeda-linked rebels rushed in reinforcements to hunker down for battle with advancing Kenyan and government troops.
Kenya launched an offensive with Somali forces on Sunday in a high-stakes bid to secure its porous border with its anarchic neighbour after a wave of kidnappings by gunmen thought to be linked to the rebels. The operation is a major escalation that risks dragging Kenya deeper into Somalia's two-decade civil war.
In the capital, Mogadishu, a suicide bomber killed six people outside a building housing two government ministries, the second bomb attack on government offices in the city this month. Al Shabaab had claimed responsibility for the first explosion and warned more attacks would come.
A high-level Kenyan government delegation was in the capital at the time of Tuesday's blast. In a joint statement, Kenya and Somalia agreed they would carry out preemptive strikes on militants that threatened the security of either country.
Warplanes swooped low over Afmadow, a rebel stronghold. A senior commander of a militia group allied to the Western-backed Somali government said his fighters were stationed about 12 km outside Afmadow as pounding rain slowed the advance.
"We are in the village of Cag Libaax, 12 km to the west of Afmadow. We are heading to Afmadow but we are slowed by rains and muddy soils," said Abdinasir Serar.
Afmadow resident Hussein Osman Roble told Reuters by telephone that most residents had started fleeing towards Dhobley, a border area which Kenyan military sources say has now been cleared of militants.
"Jets have flown low over Afmadow, terrifying the residents, while al Shabaab is digging trenches and tunnels for defense inside and around Afmadow," Roble said.
Kenyan officials have remained tight-lipped on the details of the operation but a military spokesman said Kenyan troops were 100 km (62 miles) inside Somalia in Qoqani, which is about 30 km to the west of Afmadow.
"It's difficult to estimate the length of our operation," said Major Emmanuel Chirchir.
In a joint communique with the Somali government, Kenyan Foreign Affairs Minister Moses Wetang'ula said the spate of kidnappings was indicative of a change in strategy by al Shabaab to "terrorise citizens".
Both countries pledged to cooperate in "undertaking security and military operations in the Lower Juba (border) regions of Somalia and to undertake coordinated pre-emptive action and pursuit of any armed elements that continue to threaten and attack both countries," the statement said.
Al Shabaab, which is waging an insurgency to topple a government it sees as a puppet of the West, urged Somalis to pick up arms and threatened retaliation against Kenya for the military operation.
A Somali army general said rebels were holding two Spanish aid worker hostages, and had moved them north to their coastal stronghold Kismayu as Kenyan and Somali forces closed in.
"Al Shabaab is holding them in Kismayu," General Yusuf Hussein Dunmaal, who commands Somalia's southern forces, told Reuters by telephone.
The militants have denied responsibility for kidnapping the Spaniards, seized from from a refugee camp in Kenya where they were assisting fleeing Somalis, or for two other kidnappings of Westerners in Kenya. They say the kidnappings are being used as a pretext to launch the cross-border operation.
"FLAMES OF WAR"
Al Shabaab threatened to take the "flames of war" back across the frontier if Kenya did not withdraw its troops.
"The Mujahideen and all Somalis should fight back (against the) Kenyan troops that have invaded us," a pro-Shabaab website quoted Sheikh Hassan Abdullahi Hirsi, a senior Al Shabaab official, as saying. [www.radioalfurqaan.com]
Al Shabaab has assembled columns of fighters and dozens of battle-wagons mounted with heavy machine guns, while remaining residents in Afmadow braced for clashes.
Separately, Kenya arrested two British citizens suspected of ties to Somalia's al Qaeda-linked rebels as they crossed the border into Somalia near to the coast.
Kenya, with East Africa's biggest economy, has long looked nervously at its anarchic neighbour and its troops have made brief incursions into Somali territory in the past. This week's incursion on a larger scale could invite reprisals.
"Al Shabaab has avoided attacks (inside Kenya) so far because it benefits too much from the illegal shipment of goods from Kismayu into Kenya and from financial supporters in the Somali community in Kenya," said David Shinn, a former U.S. ambassador to Ethiopia.
"Al Shabaab may conclude that the Kenyan action must be responded to, however, and the easiest way to do this is to carry out terrorist attacks inside Kenya. This would really ratchet up tension in the Horn," he said. (Additional reporting by Abdi Sheikh and Mohamed Ahmed in Mogadishu, Richard Lough and Beatrice Gachenge in Nairobi; Writing by Richard Lough; Editing by Yara Bayoumy and Peter Graff)
© Thomson Reuters 2015 All rights reserved