A series of targeted killings of schoolteachers by a militia group in Kenya has seen an exodus of staff and the closure of hundreds of schools across the north-east of the country.

Thousands of teachers have left their posts in the past two months following several suspected al-Shabaab attacks in the region.

Schools in rural areas near the Somali border have been badly hit. On 13 January, suspected members of the Somalia-based terrorist group al-Shabaab attacked the village of Kamuthe in Garissa county and killed three non-local teachers and destroyed a communication mast.

A few days earlier, a boarding school in another remote village in the Dadaab area of Garissa was targeted by al-Shabaab attackers, according to the Kenyan police. They killed three students and a teacher.

Predominantly inhabited by ethnic Somalis, north-eastern Kenya shares a long, porous border with Somalia and it is one of the country’s most marginalised areas. It is inhabited mostly by nomadic pastoralists whose access to education has been limited.

The local community had already lost hope, it would be difficult to win them back even if we get new teachers Ahmed Abdi Mohamed, headteacher

“When the teachers leave, the students go back to their nomadic lifestyle,” said Ahmed Abdi Mohamed, headteacher of Balambala boarding school, Garissa county, where seven non-local teachers have left in recent weeks.

“I see my students looking after animals every day in the village, it pains me but there is nothing I can do. When I ask the parents they tell me why waste their children’s time in an empty school when they can utilise them to look after their livestock.

“The local community had already lost hope, it would be difficult to win them back even if we get new teachers because of the nomadic lifestyle. Many of them would have gone to far places with their livestock in search of pasture.”

Local leaders and members of parliament argue the mass transfer of teachers by the government is an indication of the continued marginalisation of the region’s people.

“We have non-locals in various other sectors who are still working in their respective areas, why [are] only public teachers being transferred in one move?” said Abdullahi Hassan Maalim, a Wajir county official, where 100 primary schools are closing. “The Teachers Service Commission (TSC) should have done a thorough consultation with the local authorities to find ways of protecting the teachers instead of acting on their own. This is unacceptable, the rights of a whole generation have been denied.

“The insecurity problem has been going on for many years, but the national government did not take the matter seriously,” he said.

Al-Shabaab has staged frequent attacks inside Kenya. In 2015 an attack on Garissa University College killed 148 students.

“The national government forced us to keep the schools open symbolically because shutting them down means al-Shabaab would win,” said Mohamed. “But they are not doing anything practical on the ground to help with the continuity of learning.”

Leaders have criticised the TSC, the national body responsible for teachers’ employment, for creating an “education crisis” in the region by pulling non-local staff out of schools in the area.

The TSC has insisted that teachers will not be posted to the north-eastern region until their safety is assured.

“We appreciate the security challenges we are facing but the decision to transfer all non-local teachers from public schools was reckless,” said Maalim. “This jeopardises the future of children in north-eastern Kenya, who have long struggled to meet the national average standards in exams.”

Abdinoor Alimahadi, an education technologist who comes from the region, has been campaigning with local governors to adopt available technology to fill the gap.

“The need for technology has never been greater,” he said. “Digital learning can not only resolve the issue of [the] teacher shortage but would also improve the performance of students. I have been presenting affordable e-learning technologies to the local leadership which they all welcomed. It is time we scaled it to the whole region.”