The militants decided to leave after the passengers’ show of unity, he added.

An employee of the Makkah Bus Company, who had spoken to the driver involved in the attack, confirmed to the BBC that Muslims had refused to be separated from their fellow Christian passengers.

One of the victims was shot dead after trying to run away from the militants after passengers had been forced off the bus, the same employee told the BBC in Nairobi.

Al-Shabaab has been at war with Kenya ever since Kenyan forces entered Somalia in October 2011 in an effort to crush the militants.

Brutal acts

Al-Shabaab, a Somali group the United States has designated as a foreign terrorist organization, wants to turn Somalia into a fundamentalist Islamic state. It has launched a series of attacks in Kenya, since Kenyan forces went into Somalia to battle the extremists in 2011.

Kenya has experienced several attacks from al-Shabaab, an extremist group linked to al-Qaida, since it sent troops to Somalia to fight the group in 2011.

No one has taken responsibility for the attack, which has killed three people, but the militants are suspected to be from the terrorist group al-Shabaab.

When al-Shabaab killed 148 people in an attack in Kenya earlier this year, the militants reportedly singled out Christians, while freeing many Muslims.