Somalia's al Qaeda-linked rebels killed at least two people in a series of grenade attacks late on Tuesday in Mogadishu, and warned they would step up assaults in the capital.

The strikes highlighted the ease at which al Shabaab militants are able to infiltrate the heart of the coastal city, which is meant to be under the control of government soldiers and an African Union force (AMISOM).

A grenade was hurled at the busy Howlwadag road last night, killing two people and injuring nine others, including soldiers, said ambulance coordinator Ali Musa, referring to the attack on a street through the city's main Bakara Market.

Al Shabaab claimed to have killed 15 government soldiers in four separate attacks. Twelve were killed as they patrolled the Howlwadag road, the rebels said. Other targets included the house of a former justice minister and a prominent local elder.

In a chilling warning, the militants, who are bracing for battle with Kenyan forces in southern Somalia, said Tuesday's grenades were just an introduction.

We are planning more serious attacks inside the capital, Mogadishu, Sheikh Abdiasis Abu Musab, an al Shabaab spokesman told Reuters on Wednesday.

The militants pulled most of their fighters out of Mogadishu, epicentre of their almost five-year insurgency, in August amid reports of internal divisions and funding shortages.

Since then, the AMISOM peacekeeping force and government forces have been flushing remnant insurgent fighters from capital's outlying districts.

In a shift from more conventional street warfare, al Shabaab has increasingly resorted to suicide attacks and guerrilla-style tactics. They claimed responsibility for an October 4 suicide truck bomb which killed more than 70 people.

The United Nations estimates 98 percent of the capital is under the government's control -- the most since the overthrow of a dictator in 1991 threw the Horn of Africa country into conflict and left much of Mogadishu in the hands of warlords.

But AMISOM said the task of securing the entire city had been made more difficult by insufficient troop numbers and the insurgents melting into the population.

We know the fighters are still hiding among the population, Paddy Ankunda, AMISOM spokesman, told Reuters. It is the work of the government to do house-to-house inspections to capture the al Shabaab remnants.

The troops we have are not sufficient to secure the entire capital and its liberated areas, Ankunda said.

Fighting to impose a harsh version of sharia law on the nation, al Shabaab is also readying to wage battle with troops from Kenya, which sent its forces across the border to crush the militants more than three weeks ago.

Mogadishu residents feared a recent improvement in security in the capital would be reversed in the months ahead.

It seems (the government) will never control the grenades and other explosions, said Hassan Abdulle, who recently returned to live in the city.

(Writing by Richard Lough; Editing by David Clarke)