A group of Muslim workers is being hailed as heroes after they bravely warned Christian workers in Kenya of an imminent terrorist attack, and evacuated them to safety.

Premier reports that Muslims are said to have warned 20, mostly Christian employees that the al-Qaeda affiliated group al-Shabaab was planning an attack on July 2.

"They confronted the gunmen who proceeded to the site and failed to get what they wanted. [The attackers] opened fire but no one was injured before they escaped," north-eastern regional commissioner Mohamed Birik told media.

The foiled attack took place in Mandera County, in the northeast corner of Kenya. This area borders Somalia and is Muslim majority. According to an Open Doors worker, this was a "show of solidarity from locals".

A Christian aid worker said: "The area feels more like Somalia than Kenya and usually is a very hostile place for Christians. Most of Believers who live here came here from other areas of the country for work and some for ministry. But they are treated like unwanted outsiders and face a lot of harassment and the continuous threat of targeted al-Shabaab attacks.

"Please thank the Lord with us that another bloodbath was prevented. Pray that this kind of action will become the new norm in this area. Pray for the protection over those who took this bold move."

The militant Islamist group al-Shabaab has stated publically that it wants Somalia free of all Christians.

According to Open Doors USA, most Somali Christians keep their faith completely secret. If al-Shabaab finds someone who has become a Christian, the militants will often kill them on the spot.