Philippine authorities were on Wednesday probing an assassination attempt against an influential Saudi preacher who was on an IS group hit list, after the gunman was killed and two suspects arrested.
Preacher Sheikh Aaidh al-Qarni and Saudi diplomat Sheikh Turki Assaegh were both wounded in a shooting as they left a university auditorium in the southern port city of Zamboanga, where the cleric had given an address.
Their Filipino police escorts killed the lone assailant, while two other suspects who were seen with the gunman were arrested as they tried to escape, police said.
"It all happened so fast. Suddenly there were gunshots," local Muslim community leader Wakil Kasim, who was at the auditorium at the time of the incident, told reporters.
The gunman "popped up from the crowd, moved in close and shot the victim" as he was boarding his car, said city police spokeswoman Chief Inspector Helen Galvez, adding that the gunman then walked to the other side of the vehicle and shot the Saudi diplomat.
Qarni was shot in the right shoulder, left arm and chest while Assaegh, a religious attache at the Saudi embassy in Manila, was wounded in his right thigh and left leg, according to a police report.
A student driver's license and a local government ID were recovered from the man, which identified him as a 21-year-old Filipino, but police said they were not ruling out forgery.
A uniform for engineering students in the Western Mindanao State University, where Qarni was speaking, was found hidden in his backpack, but university officials could not immediately confirm the gunman was enrolled in the institution.
Footage from ABS-CBN television showed the remains of the gunman, who was wearing a hoodie, sprawled face down on the ground beside the victims' car.
Islamic State militants who control vast swathes of Iraq and Syria had called on "lone wolves" to attack Qarni and several other Saudi clerics whom they accused of apostasy in the latest issue of Dabiq, their monthly online magazine.
The Philippine government should investigate whether the Islamic State group (IS) had influenced the shooting, international security analyst Stephen Cutler told reporters in Manila.
"Its possible it is Daesh-related because he was on this hit list but I don't know yet," the American said, using an Arabic abbreviation for the IS group.
Tuesday's shooting also came as the army quelled a rampage by an obscure armed group that pledged allegiance to the Islamic State in Butig, a poor farming town some 200 kilometres (120 miles) northeast of Zamboanga.
At least 12 militants and five soldiers were killed while more than 30,000 people were displaced over several days of fighting, which ended as the army seized the gunmen's main camp over the weekend.
However, Filipino authorities have not linked sympathisers of Islamic State jihadists to Tuesday's attack.
Saudi media outlets described Qarni as a senior Islamic scholar and he has more than 12 million followers on Twitter. In his book "Awakening Islam," the French academic Stephane Lacroix included Qarni in his list of "the most famous" Saudi preachers.
Last week, the Saudi embassy in Manila asked local police for increased security for its premises, as well as for the Saudi national airline due to an unspecified threat, Philippine foreign affairs spokesman Charles Jose said.
Zamboanga, 800 kilometres south of Manila, is one of the largest cities in the southern Philippines, an area troubled by a decades-long separatist rebellion by the mainly Catholic nation's Muslim minority that has claimed more than 100,000 lives.
The port city has a mixed Christian and Muslim population, and has been a frequent target of attacks by local Muslim militant groups.