The Algerian army killed seven Islamist militants during a raid on a secret base near the Algerian capital, a security official said on Monday.