At least two people have been killed and four others wounded in a grenade attack on a mosque in the southern Philippines, say local officials.

The attack in Zamboanga city took place in the early hours of Wednesday, just days after deadly twin blasts at a Roman Catholic cathedral in the island of Jolo and a vote backing wider Muslim self-rule in Mindanao, the country's volatile southernmost region.

"A grenade was lobbed inside a mosque killing two persons and wounding another four," regional military spokesman Lieutenant Colonel Gerry Besana told AFP news agency of the attack in Zamboanga.

In a statement, President Rodrigo Duterte's spokesman, Salvador Panelo, said the attackers are "taunting" the government in its handling of the peace and order situation in Mindanao.

"Terrorism has once again reared its barbaric and ugly head," Panelo said.

The victims were reportedly sleeping inside the mosque at the time of the attack, which drew immediate condemnation from local officials

"There is no redeeming such blasphemous murder. It is the highest form of cowardice and obscenity to attack people who at prayer," said regional leader Mujiv Hataman.

"We call on people of all faiths... to come together to pray for peace."

The Ulama Council of Zamboanga Peninsula condemned what it called a "devilish, irrational and inhumane act" and urged people to be vigilant.

There was no immediate claim of responsibility.

The military called for unity among Mindanao communities and urged the public to refrain from speculation on social media that could spread misinformation.

Regional task force commander Colonel Leonel Nicolas stressed the incident was "not a retaliatory act" for the church bombing three days before.

The country was put on high alert after two explosions during a Sunday church service at the Cathedral of Our Lady of Mount Carmel in Jolo town, Sulu province, killed at least 21 people and wounded more than 100 others.

The Islamic State of Iraq and the Levant (ISIL, also known as ISIS) group claimed responsibility for the cathedral blast, one of the worst incidents of violence in Philippines' restive south.

President Rodrigo Duterte blamed Abu Sayyaf, a domestic armed group that has pledged allegiance to ISIL and has carried out bombings, kidnappings and beheadings in Mindanao, for carrying out the church bombing.

"Nobody, but nobody, could perpetuate that kind of terrorism in that area," he said this week during a visit to the region.

The incidents follow a successful and peaceful January 21 referendum that overwhelmingly approved autonomy for the estimated five million inhabitants of predominantly Muslim parts of Mindanao.

That followed a decades-long separatist struggle that has killed at least 120,000 people.

Muslims are a minority in the predominantly Catholic Philippines and represent about a quarter of the population of the Mindanao region.

Sectarian violence does not happen often there and the autonomy plan, which aims to address chronic poverty, underdevelopment and violence, is largely supported by Filipinos nationwide.