There was a sound of gunfire, and the impact of bullets striking steel, and the bus suddenly lurched to a stop just outside the northeastern Kenyan city of El Wak.

More than 10 Somali militants clambered on board, heavily armed, witnesses of the Monday attack told the Daily Nation, a Kenyan newspaper. The gunmen began shouting demands at the passengers, ordering them to get off the bus and separate into groups — Muslims on one side, everyone else on the other.

But Muslims aboard the bus traveling through northeastern Kenya helped protect the Christian passengers, witnesses and officials told numerous media outlets.

Two people died and at least three were injured during the attack on the bus and a truck, confirmed Mandera County Gov. Ali Roba, who described it as an act of terrorism.

A Kenyan security official, Mohamud Saleh, said al-Shabab rebels are thought to be responsible, the Associated Press reported. A spokesman for the Somalia-based Islamist militant group told Reuters that fighters shot at the bus and “some of the Christian enemies died and others were injured.”

Officials and witnesses said militants stopped the bus, asked passengers to identify their religion, and then attempted to separate them.

It has happened before. In November 2014, al-Shabab gunmen attacked a bus full of teachers in the same region, pulling 28 non-Muslim passengers from the vehicle and shooting them point blank, according to the Guardian. The following month, the BBC reported, the militant group did the same to non-Muslim workers at a quarry near the Somali border. The group has also indiscriminately killed both Muslims and non-Muslims during deadly attacks in Kenya, as it did in the April siege of Garissa University, in the country’s east, that left 147 people dead.

But not this time. Militants told passengers to get off the bus, “demanding that Muslims separate from Christians, but they refused,” the Interior Ministry said in a statement, according to Agence France-Presse.

“These Muslims sent a very important message of the unity of purpose, that we are all Kenyans and that we are not separated by religion,” Interior Minister Joseph Nkaissery told local media at a briefing. “Everybody can profess their own religion, but we are still one country and one people.”

Mandera County, where the attack took place, is in Kenya’s northeast along the border with Somalia. When the militants attempted to sort through the passengers, they told “locals” — most of whom are Muslim and ethnic Somalis — that they could get back on and be spared, according to the BBC.

They refused.

“We even gave some non-Muslims our religious attire to wear in the bus so that they would not be identified easily. We stuck together tightly,” Abdi Mohamud Abdi, a Muslim passenger, told Reuters. “The militants threatened to shoot us, but we still refused and protected our brothers and sisters. Finally they gave up and left but warned that they would be back.”

Deputy County Commissioner Julius Otieno confirmed that account to Reuters, adding that Muslim passengers refused to help the militants, who “were trying to identify who were Muslims and who were not.”

“The locals showed a sense of patriotism and belonging to each other,” Roba, the county governor, told the Star, a Kenyan daily. He said the passengers insisted that al-Shabab either “kill them together or leave them alone.”

Another passenger, 28-year-old teacher Abdrirahman Hussein, told the AP that some Muslims gave head scarves to non-Muslims:

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.

An unnamed police official, speaking to AP, and injured witness Abdirashid Adan, speaking with Kenya’s Daily Nation newspaper, said the militants eventually left the bus alone, thinking a police escort was not far behind. The official said a passenger lied about the police escort, while Adan said the sound of the vehicle prompted the gunmen to flee.

With the militants momentarily gone, the bus quickly departed. But one person died in a subsequent attack on a truck, according to reports.

After the bloodshed of the bus attack last November, buses carrying passengers to and from Mandera were given police escorts. But in this case, the bus bypassed a police roadblock, police spokesman Charles Owino told Reuters.

That 2014 attack also pushed hundreds of non-Muslim civil servants living in Mandera to seek shelter at a Kenyan military base, where they demanded that the government evacuate them from the region, according to the BBC. More than 2,000 teachers and many of the area’s health workers fled, leaving Mandera without many essential services.

Kenya’s poorly guarded northeastern border with Somalia is considered a security weak spot for the country. Though al-Shabab is based in Somalia, the group stepped up its cross-border violence after Kenya sent troops into Somalia to help fight the militants in 2011. The group has also said it believes northeastern Kenya should be part of Somalia.

Many Kenyan Muslims of Somali descent live in Mandera, a county on the northeastern border with Somalia.

Attacks by al-Shabab are now a semi-regular horror in Kenya’s eastern regions.

The incident on the bus Monday was a brave display of solidarity in a country strained by religious conflicts. But it was also a sign of how angry Mandera’s Muslims are about al-Shabab’s relentless violence in their region, the BBC pointed out. They have been victims of extremist attacks in the past, though they purportedly were not the target of the one on Monday.

As news of Monday’s incident spread on social media, people in Kenya and elsewhere hailed the #ManderaHeroes.