Suspected Abu Sayyaf fighters opened fire at two soldiers on a motorcycle, with a stray bullet also killing a child.

Two soldiers and a two-year-old girl were killed in an attack by suspected members of the Abu Sayyaf armed group in the southern Philippines, as the country marked the festival of Eid al-Adha, the military said on Tuesday.

The soldiers were travelling on a motorcycle along a busy road in Talipao town in Sulu province, 1,000km south of the capital, Manila, on Monday when the attack took place.

The troopers were killed in the ambush, while two girls – a two-year-old and an 11-year-old – were wounded, said Major General Corleto Vinluan Jr, commander of a provincial anti-terrorism task force.

The two-year-old died while being treated in a hospital, while the 11-year-old was still in critical condition, he added.

“We deeply condemn this very deceitful act of the Abu Sayyaf, who do not in any way represent the Islamic way of living,” said Lieutenant General Cirilito Sobejana, a regional military commander.

“We would like to extend our sympathy to the bereaved families of the victims by Sayyaf’s inhumane act,” he added.

“Rest assured all sorts of assistance will be provided as our simple way of commiseration.”

Abu Sayyaf is the most violent Muslim group in the Philippines. It is believed to be allied with the Islamic State of Iraq and the Levant (ISIL, also known as ISIS) armed network, and has been blamed for some of the worst attacks in the country as well as high-profile kidnappings.