Algeria's top military chief has heightened the army's state of alert over border security because of concerns over arms trafficking and turmoil in neighboring Libya, where Islamic State has gained ground.

Chief of staff and deputy defense minister Ahmed Gaed Salah visited southeast Algeria, close to Libya's border, on Sunday, days after the army killed three Islamist militants in an ambush and seized an arsenal including stinger missiles.

Algeria, Africa's largest country with over 1,000 km (600 miles) of border with Libya, has been warning about potential for violence to spill over from its neighbor which has sunk into turmoil since the 2011 fall of Muammar Gaddafi.

To Algeria's south, Islamist militants have expanded their attacks recently to parts of Mali and beyond.

"What our region is living in terms of disorder and an unprecedented worsening of the security situation could have unfavorable outcomes on security and stability," the commander said, according to APS state new agency. "We need to be more vigilant."

Algeria has already increased its military presence along the borders with more troops and using drones for surveillance, according to local press reports.

Algeria, steadily emerging itself from more than a decade of conflict with armed Islamist fighters in the 1990s, is a key Western ally against militancy in the region.

Violence and attacks in Algeria are rarer, though al Qaeda in the Islamic Maghreb and Islamic State affiliates are still active in pockets of the country especially in the remote south and the mountains to the east of Algiers.