Al-Qaeda's North African branch on Saturday said it killed 14 Algerian soldiers in an ambush southwest of the Algerian capital, in what would be the deadliest attack on the army in over a year.
The El Khaber newspaper, citing security sources, reported earlier in the day that troops were killed by a terrorist group on the road to Tifran, a wooded area in the south of Ain Defla province, 140 kilometres (85 miles) from the capital.
The ambush took place on Friday night at the start of the Eid al-Fitr holiday marking the end of the Muslim fasting month of Ramadan.
Al-Qaeda in the Islamic Maghreb (AQIM) claimed the attack in an unverified statement posted online late on Saturday night.
"The knights of Islam have, on the first night of Eid killed 14 soldiers in an ambush on an army platoon in the area of Djebel Louh," it said, adding that the attackers managed to escape unharmed after seizing the dead troops' weapons.
The military gave a different toll of nine dead and two wounded.
"Members of the People's National Army immediately proceeded to seal off the area and unleashed a vast operation to flush out and kill the criminals," it said in a statement.
The defence ministry said last week that 102 Islamists were killed, captured or surrendered to security forces in the first half of 2015.
In April 2014, 15 soldiers were killed in an attack in the country's mountainous east.
The Ain Defla region was considered a hub for jihadist groups during the 1990s, but there has been a drop in Islamist-linked violence in Algeria in recent years.