At least nine Algerian soldiers and six Islamists have been killed in clashes, the authorities say.
At least five soldiers had been injured in the clashes, in a wooded area west of the capital Algiers, officials said.
There has been an increase in insurgent attacks in recent months after a period of calm in the North African country.
According to government figures at least 200,000 people have died in the Islamist insurgency, which began in 1992 after the army cancelled polls.
The armed insurgents had ambushed a military patrol in the Zaccar forest in the Ain Defla region on Saturday, security officials said, killing the soldiers during a gun battle.
They said the rebels had been killed when backup troops arrived to help the soldiers, AP news agency reports.
No group has yet claimed responsibility for the attack.
At least 33 people have died in rebel clashes in April, according to figures from AFP news agency.
Last August, Algeria offered Islamist militants a six-month amnesty on condition of surrender, but fewer than 300 came forward.