NAIROBI - Attackers shot dead four worshippers on Sunday when they burst into a church service near the Kenyan port city of Mombasa, spraying the congregation with bullets, police said.

The attack, which also left about 17 people wounded, came amid heightened warnings of a threat of Islamist violence in Kenya and despite boosted security in major cities including Mombasa. "They were shot by gunmen who shot indiscriminately at worshippers and then fled," said local police chief Robert Mureithi, from the Likoni district just south of Mombasa.

Two people were killed instantly, while two more later died of their injuries, the Red Cross said, adding that 17 people had been taken to hospital. Kenya's National Disaster Operation Centre said there had been "mass casualties" in the attack on an evangelical church.

There was no immediate claim of responsibility, but Kenya has been hit by a series of attacks since sending troops into southern Somalia in October 2011 to battle the Al-Qaeda-linked Shebab insurgents.

Kenyan troops, which have since joined the African Union force in Somalia, are taking part in a fresh offensive launched this month against Shebab bases. Kenya and Uganda, another key contributor of troops to the AU force, have both warned of the threat of fresh Shebab attacks in their own countries. The attack on the church comes six months after Shebab commandos carried out the September massacre in Nairobi's Westgate mall in which at least 67 people were killed.

The group said the carnage was retribution for Kenya's military role in Somalia. The latest attack also comes just days after police arrested two men with a vehicle stashed full of large quantities of powerful explosives prepared in pipe bombs, which experts said would have been strong enough to bring down a major building. Kenya's top security chiefs warned last month of "increased threats of radicalisation" among homegrown Islamists.

Interior Minister Joseph Ole Lenku on Saturday said security had been beefed up in Mombasa, as well as in the capital Nairobi and other towns. "Our officers are out there, they are doing everything possible to fight crime and terrorism," he said in a statement. But tensions are high between the security forces and radical Muslim youths. Last month police raided a mosque accused of encouraging extremism in Mombasa, detaining scores of suspects whom they accused of attending a radicalisation meeting.

Several senior Muslim leaders have been gunned down on the coast, with their supporters accusing the police of state-sponsored assassinations - claims the security forces deny. Homegrown groups including the Islamist Al-Hijra group, a radical organisation formerly known as the Muslim Youth Center, operate on Kenya's coast and have been linked to the Shebab.