NAIROBI — At least six people were killed in Kenya on Friday when gunmen sprayed two buses with bullets near the border with Somalia, a regional official said.

The Somali militant group al-Shabaab carried out the attack, said Abdiasis abu Musab, al-Shabaab’s spokesman for military operations.

The attack occurred at 6.30am GMT as the buses were travelling in Mandera county to Mandera town, from the capital, Nairobi, said Mandera County Commissioner Fredrick Shisia.

“So far we are talking of six dead,” he said, noting that the attack had happened on the road between Wargadud and Elwak.

Abu Musab said one of those killed was a police officer.

Mandera has been the scene of frequent al-Shabaab attacks, which have killed dozens of civilians and security personnel. The US warned its citizens on Thursday against travelling near the border with Somalia because of threats from al-Shabaab.