At least 20 were wounded at the academy in Cherchell, which lies west of Algiers. The death toll was expected to rise, according to the Sidi Ghilas hospital where the victims were taken.
Islamist extremists have battled Algerian security forces since 1992 when the army cancelled a national election that a now-banned Muslim fundamentalist party was poised to win.
Security forces gained the upper hand over the years, but sporadic attacks continue and increased dramatically in July. An estimated 200,000 people civilians, insurgents and security forces have been killed since the violence began.