Two gunmen stormed a church near the Kenyan coastal city of Mombasa and opened fire on worshippers, killing six people and wounding 20 others, police officials said.

One witness said the gunmen shouted out in a foreign language before shooting indiscriminately at the congregation on Sunday.

"Both carried big guns and began shooting all over the place. I fell to the ground and could hear screams," said Lilian Omondi, who was leading a prayer recital at the time.

Another bystander said the assailants walked unhurriedly out of the church and opened fire on people standing outside.

An Interior Ministry official later said they escaped.

"They were ordinary looking guys, one of them tall, dark and wearing a long-sleeved shirt. They walked casually as if all was ok," said Peter Muasya. "Then they started shooting at those of us who were standing outside."

Somali al-Qaeda linked group al-Shabab and local sympathisers have carried out multiple attacks in Kenya, in revenge for the Kenyan army's intervention in Somalia to crush the Islamist rebels.

Along Kenya's Indian Ocean coast, tension is high particularly among Muslim youths who claim the security forces have been heavy handed in their crackdown on recruitment for armed groups.

Kenya's parliament has called for better coordination between the security and intelligence agencies after 67 people were killed in a shopping mall attack in Nairobi in September.

The church shooting took place in Likoni, located across a deep-water channel from Mombasa city, a major tourist hub.

It came days after prosecutors charged two Somalis with terrorism offences after police seized a car packed with explosives.

There was no immediate claim of responsibility. Likoni's police chief Robert Mureithi said it appeared the gunmen were armed with automatic weapons.