NAIROBI, Kenya — Muslims in a bus in northern Kenyan helped dress non-Muslim passengers in Islamic garb, to prevent Islamic extremists from identifying them for slaughter, witnesses said Monday.

Two people died in the attacks in northern Mandera County when gunmen believed to be Somalia’s al-Shabab rebels shot at a bus and truck headed for Mandera town, North Eastern Regional Coordinator Mohamud Saleh said.

The bus was from traveling from the capital city, Nairobi, with 60 passengers when it was stopped at Papa City by a group of Islamic militants who shot the windscreen, witnesses said.

Abdrirahman Hussien, a 28-year-old teacher, said some of the Muslim passengers gave non-Muslims head scarfs to try and conceal their identities when the bus stopped, probably remembering a previous attack in the same region last year when al-Shabab gunmen killed 28 non-Muslims on a bus.

An extremist entered the bus and ordered everyone to get out and form two separate groups of non-Muslims and Muslims, said Hussein. One person, a non-Muslim, decided to run and was shot in the back and died, he said. He said several non-Muslims managed to group with the Muslims.

A police official who insisted on anonymity because he is not authorized to give information to the media said that before the rebels could take action on the non-Muslims, a Muslim man fooled the attackers by saying that a truck full of police officers that was escorting bus was not far behind.

The officer said the lie about the police escort prompted the extremists to order everyone back on the bus and told them to drive off. The extremists ambushed a truck on the same road and asked the driver whether he had seen a truck full of police officers, the officer said. They shot the passenger, a non-Muslim off-duty police officer who had hitchhiked when he tried to run away, the officer said.

Kenya has experienced a wave of retaliatory attacks by al-Shabab, which is linked to al-Qaida, since it sent troops to Somalia to fight the extremists in 2011.

Mandera has borne the brunt of the attacks recently. Last week al-Shabab militants carried out three attacks on security forces in Mandera.

Al-Shabab separated non-Muslims from Muslims on a bus on Nov 22, 2014, and killed 28 non-Muslims. That December, 36 non-Muslim quarry workers were killed. In July 14 quarry workers were killed.