Nairobi - A man died after an explosive device he was assembling blew up in a residential area in the capital, Kenyan police officials said on Sunday.

The explosion happened a day after the Australian government advised its citizens against travelling to Nairobi and the coastal town of Mombasa due to the high threat of a terrorist attack and rampant crime.

Police are looking for three other men who were seen running out of the apartment after the blast in the three-storey building, said Barasa Wabomba, the police chief of the Starehe area in Nairobi.

The blast rocked the building, causing cracks in the walls and shattering the windows. Wabomba could not immediately say who was responsible for the explosion though he said initial suspicion fell on sympathisers of Somali Islamic extremists.

The suspect was apparently assembling the device in the kitchen when it went off, dismembering his body, said Nairobi Police chief Benson Kibue. He said the four suspects moved into the two-bedroomed house on the first floor a month ago, but the landlord became suspicious of their movements and had given them notice to vacate the house at the end of this month.

Kenya has experienced dozens of small bomb and gun attacks since al-Qaeda-linked Somali militants known as al-Shabaab vowed to avenge Kenya for sending troops to Somalia in October 2011 to fight the militants.

Al-Shabaab claimed responsibility for the September 21 attack on an upscale mall in Nairobi in which at least 67 people were killed by four Somali gunmen.

Earlier on Sunday, police in the coastal city of Lamu found a grenade at the African Independent Pentecostal Church of East Africa, said Lamu west police chief Joseph Sigei.

The incident came a week after gunmen killed six worshippers in a church in the Likoni area of Mombasa. Police on Friday said they killed two suspects believed to have carried out the attack.

On March 17, Kenyan authorities said anti-terror police foiled a planned terrorist attack in the coastal city of Mombasa after they intercepted a car packed with explosives. Two suspects have been charged in court with terror related offenses.

The Australian government's warning issued on Saturday said: “We continue to receive regular reports that terrorists are planning a range of attacks in Nairobi and Mombasa... We now advise Australians to reconsider their need to travel to Nairobi and Mombasa due to the high threat of terrorist attack and the high level of crime... The attack on the Westgate Mall in 2013 and a series of incidents and attacks in 2014 underscores that there is a serious and ongoing risk of large scale acts of terrorism in these locations.”

Kenyan President Uhuru Kenyatta said last week that his government will try to stop terrorism by making the biggest investment in security since independence in 1964. - Sapa-AP