ALGIERS, April 20 (Reuters) - Algerian armed forces have foiled an attempted suicide bomb attack in the northeastern city of Constantine, with one attacker killed and a second arrested, a security source said on Thursday.

The military operation on Wednesday evening came just a few weeks after Abu El Hoummam, a senior member of the local affiliate of the Islamic State was also killed in Constantine, the country's third largest city.

Islamist militants have carried out or attempted several attacks on security targets in Constantine in the past few months including the shooting of a policeman in a coffeeshop by three gunmen on October 2016.

A suicide bomber tried to attack a police station in Constantine in February, but he was shot before he could enter the building.

Attacks and bombings have become less common in Algeria since the end of a 1990s war against armed Islamists in which more than 200,000 people died. Some militants entered into an armistice, but hardliners stayed in the mountains.

Al Qaeda's North Africa branch, Al Qaeda in the Islamic Maghreb or AQIM, and small brigades of Islamic State-allied militants are still active, mostly in remote mountains and the desert south.

Algerian troops have been tracking Islamic State-allied militants since the Caliphate Soldiers, a splinter group linked to fighters in Iraq and Syria, kidnapped and beheaded a French tourist in 2014 in mountains east of Algiers.

(Reporting By Lamine Chikhi; editing by Patrick Markey and Ralph Boulton) ((lamine.chikhi@thomsonreuters.com;))