Representational imageReuters

An ambush on a bus in Kenya left 28 people dead, as gunmen suspected to be part of the Somali militant group al-Shabab targeted non-Muslims, in a gruesome incident early on Saturday.

The gunmen ambushed the bus in Mandera county near the Somali border in the north-east part of the country, and killed 28 non-Muslims after profiling.

"More than 100 armed men stopped the Nairobi-bound bus and ordered everyone out at around 5.30 am", Mandera Deputy County Commissioner Elvis Korir was quoted saying by Xinhua, IANS reported.

The attackers took the bus off the road and singled out non-Muslims among the 60 passengers and killed them, BBC reported.

"Bandits ambushed a bus from Mandera that was heading to Nairobi at dawn and killed 28 passengers of the 60 that were in the bus," the ministry of Interior said in its statement on Twitter.

"We were told that 100 armed men stopped the bus just after it left Arabia area and all the passengers were asked to come down and divided into two groups of Somalis and non-Somalis," Korir said, adding the non-Somalis were sprayed with bullets.

The racial profiling of the passengers seemed chillingly similar to the process adopted by the Islamic State in its territory, as one official reportedly told Kenya's Daily Nation newspaper that the  passengers were asked to read out verses of the Quran, and the attackers killed those who failed.

Violence along Kenya's border with Somalia has displaced hundreds of people.