Fourteen Algerian soldiers were killed in an ambush by Islamist militants in a region east of the capital, the worst loss of life suffered by the military in years.

Militants hiding along a road in the Kabylie mountains late on Saturday opened fire on a bus transporting the soldiers, killing 11 instantly. Three others died from their wounds.

The attack, which came only two days after the ageing president, Abdelaziz Bouteflika, was reelected with more than 80 per cent of the vote, highlights the growing security concerns in the country.

In the 1990s, Algeria fought a decade-long civil war against Islamist militants after the army cancelled a parliamentary election that an Islamic party was poised to win.

The war killed an estimated 200,000 people. Mr Bouteflika is credited with bringing peace and stability to the country, though sporadic attacks continue.

There was no immediate claim of responsibility for Saturday’s attack.

“A convoy of the People’s National Army (ANP) that was returning from an operation to secure Thursday’s presidential election was surprised by a large terrorist group that had laid an ambush for it” at the village of Iboudrarene, a source told national news agency APS.

Troops “immediately launched a search operation to find the attackers”, the source said.

Thirty-seven militants were killed by the military across Algeria during the first quarter of the year, including 21 in Kabylie, the defence ministry said.

Saturday’s attack underscored that Mr Bouteflika’s campaign promises, to promote continued stability and security, will be difficult to achieve.

“What I can say for sure is terrorism has never stopped,” said Amel Boubekeur, a research fellow at the Centre Jacques Berque in Rabat.

While militancy is still a major problem for the country, the ideologies of those who carry it out are not always clear.

Berber people also live in the Kabylie mountains and carry grievances against the state. Impoverished young people might also join Islamist militants for money sometimes, Ms Boubekeur said.

In Algeria’s south, where the bulk of the country’s energy resources are located, there is also unrest and terrorism. In January 2013, Al Qaeda-linked militants took over the Tigantourine gas plant, leaving 40 hostages dead.

There are also regular protests, a reaction to the government’s inability to bring water and electricity to some areas of the country.

“Although the president has been reelected on the basis of maintaining stability and not going back to the nineties … the attacks are still going on,” Ms Boubekeur said.

Mr Bouteflika, 77, has been accused of being too old to run the country, especially after a stroke last year left him unable to campaign in the election.

The deterioration of Mr Bouteflika’s health comes as Algeria is coming to grips not just with the continued threat of Islamist militants, but a downturn in hydrocarbon production.

An estimated 97 per cent of the country’s exports are oil and natural gas, with most going to the European Union.

The country aims to portray itself as an stable nation in violence-wracked North Africa and a possible alternative source of energy for the EU following the fallout over Ukraine.

However, oil production has been falling since 2005. In 2013, hydrocarbon export revenue dropped to $63 billion from $70 billion in 2012.

There are some expectations that shale gas exploration would increase revenues, but the danger poised by militants makes international companies wary of investing.

Along with the double-barrelled threat of Islamist militants and falling energy revenues, the Algerian government faces a young population eager for change.

When Arab Spring-inspired protests broke out in 2011, Algeria staved off social unrest by increasing public spending. The government is not expected to be able to do so for long.

The significance of the anti-government sentiment was evidence by Mr Bouteflika’s supporters having to cancel several rallies in the lead up to the elections, Ms Boubekeur said.

“It’s a myth that Algeria is a state that has its security under control.”

jvela@thenational.ae

* With additional reporting by the Associated Press and Agence France-Presse