ALGIERS, July 18 (Reuters) - At least 11 Algerian soldiers were killed after they were attacked by Islamist militant gunmen west of the capital Algiers, a security source said on Saturday.

The source did not give further details about the attack which took place on Thursday night in the Ain Defla area.

Algeria has found stability after a 1990s war with armed Islamist groups. But al Qaeda-allied fighters and a splinter armed group loyal to Islamic State are still active in pockets of the country, mostly in remote mountain areas.

(Reporting by Lamine Chikhi; Writing by Patrick Markey; Editing by Pravin Char) ((pat.markey@thomsonreuters.com; +21620349006; Reuters Messaging: pat.markey.thomsonreuters.com@reuters.net))