* Al Shabaab warned of attacks during fasting month
* Two traffic police, one soldier gunned down
* Somalia wrecked by more than two decades of conflict
By Abdi Sheikh and Feisal Omar
MOGADISHU, June 29 (Reuters) - Islamist rebels shot dead three members of Somalia's security forces in the capital on Sunday, police and witnesses said on the first day of Ramadan, the Muslim fasting month when insurgents had warned they would stage attacks.
The government and African Union peacekeepers have stepped up security to try to prevent assaults during the month by the Islamist al Shabaab group, which has waged a seven-year campaign to impose its strict interpretation of Islamic law.
Two traffic police men were gunned down by militants on Maka al Mukaram road, a major thoroughfare through the centre of Mogadishu, the commander of traffic police, Ali Hirsi, told Reuters. "The attackers escaped," he said.
In a northern district of the city, a soldier was shot dead by men with pistols, shopkeeper Ali Abdullahi said, adding it happened on the street outside his store.
Al Shabaab has a strong presence in the north of the capital, residents say.
The group claimed responsibility for all three killings. "This marks the beginning of our operations. More are to follow," the spokesman for al Shabaab's military operations, Sheikh Abdiasis Abu Musab, told Reuters.
Another al Shabaab spokesman, Sheikh Ali Mohamud Rage, had said on Saturday that the extra deployment of African Union and Somali forces would not be able to halt their operations.
Al Shabaab also staged a series of gun and bomb attacks last year during Ramadan, when Muslims fast from dawn to dusk.
In the past year or so, al Shabaab has killed dozens of people in guerrilla-style assaults in Mogadishu, on U.N. offices, the presidential compound, parliament and the courts.
The government, which is trying to impose order on a nation that has been ruined by more than two decades of conflict, has said it wants more international training and other help, and has also improved coordination between its security agencies.
"The security situation remains unpredictable," the U.N. special representative for Somalia, Nick Kay, told Reuters in Nairobi on Saturday.
He noted the government's warning about attacks during Ramadan, saying it was "apparently a traditional period of al Shabaab activity."
The African Union forces mounted a new offensive earlier this year against al Shabaab strongholds in the country, driving the militants out of several towns.
But the group still controls swathes of countryside and has made it difficult for the government to send supplies to newly regained towns. That worries officials who say the failure to help inhabitants could be used as propaganda by al Shabaab.
(Additional reporting by Drazen Jorgic in Nairobi; Writing by Edmund Blair; Editing by Andrew Heavens)