Pope Benedict XVI gestures during a harbor cruise in Sydney, Thursday, July 17, 2008. (AP Photo/Rick Rycroft, Pool)
Pope Benedict XVI condemned the attack.
The bomb exploded outside the Immaculate Conception cathedral in Cotabato city as churchgoers were attending Mass. Two people were killed instantly in the attack and three others, including a militiaman, later died in hospitals, military officials said.
Among the wounded were six soldiers and militiamen who were in an army van that passed by the cathedral when the device, fashioned from a mortar round, exploded, Cotabato city Mayor Muslimin Sema said.
The improvised explosive, which was set off remotely by mobile phone, was hidden near a row of food stalls selling roasted pig, Maj. Gen. Alfredo Cayton said. Police arrested one man seen using a phone during the explosion. He was carrying three identification cards with different names, Sema said.
Cathedral guard Nestor Luna said shrapnel flew in all directions, inflicting wounds on his head, arms and feet.
"I wanted to help the wounded, but I felt dizzy and saw my white uniform soaked in blood. Somebody helped me walk away," Luna told The Associated Press by telephone from the Cotabato Regional and Medical Center.
"Whoever did this should know that they hit so many innocent civilians," he said.
At the Vatican, Pope Benedict XVI deplored the bomb attack.
"While I pray to God for the victims of this ignoble gesture, I raise my voice to condemn yet again the recourse to violence, which is never a worthwhile way to solve existing problems," Benedict told pilgrims in St. Peter's Square.
Chief nurse Norma Reyes said at least seven of the wounded were in critical condition and needed surgery.
TV footage showed four wounded soldiers sitting dazed on the sidewalk and a militiaman lying unconscious, face down on the seat of the shrapnel-damaged van.
Two bodies lay sprawled near the sidewalk while a stunned woman limped out of a food stall, blood dripping from her foot. Soldiers helped the wounded into ambulances with sirens wailing.
Army troops with assault rifles surrounded the cathedral and cordoned off nearby streets, footage showed.
"Nobody has the motive, the capability and the track record to carry out this terrorist attack except" the group, Cayton told The AP.
Rebel spokesman Eid Kabalu denied his group was involved and condemned the bombing. He said the rebels would not do anything to foment a religious war.
Military spokesman Lt. Col. Romero Brawner said investigators were trying to determine if the attackers targeted the military van.
"They will hit any place where civilians congregate. They have no regard for life," Brawner said.
A similar bomb went off on a roadside in Datu Piang township in nearby Maguindanao late Saturday, wounding three people in an attack believed to have also been staged by the rebels, Brawner said.
The rebels have waged a decades-long battle for self-rule in the southern Mindanao region, homeland of Muslims in this predominantly Roman Catholic nation.
Malaysian-brokered peace talks between the government and the rebels collapsed last year when a preliminary deal on an expanded Muslim autonomous region fell apart, sparking new deadly clashes that have displaced large numbers of villagers.
Cotabato city, about 545 miles (880 kilometers) south of Manila, has been hit previously by deadly bombings blamed on Muslim rebels and extortion gangs.
A bomb exploded at a Cotabato city bus terminal in February, wounding two people. A 2007 bomb blast at another terminal killed a child and wounded 36 people.