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

Two people died in the attacks on Monday 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 travelling 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.

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 from a bus, Abdrirahman Hussien, a 28-year-old teacher, said.

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.

Before the rebels began singling out and killing the non-Muslims, a Muslim passenger fooled the attackers by saying that a truck full of police officers that was escorting bus was not far behind, said a police official who insisted on anonymity because he is not authorized to give information to the media.

The lie about the police escort prompted the extremists to order everyone back on the bus and tell them to drive off, said the officer. 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 attacks by al-Shabab, which is linked to Al Qaeda, since it sent troops to Somalia to fight the extremists in 2011.

Mandera has carried 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. On July 14 quarry workers were killed.