ALGIERS (Reuters) - Algeria has barred all Syrians from entering the country via its southern border with Mali and Niger to keep out members of defeated rebel groups from Syria deemed to pose a security risk, a senior official said on Wednesday.

Hassen Kacimi, the official in charge of migrants policy at the interior ministry, told Reuters that Syrians seeking refuge in Algeria in this way were suspected to be Islamist militants and were not welcome.

Algeria went through years of devastating civil war with hardcore jihadist groups in the 1990s. While violence is now greatly diminished, sporadic attacks continue in isolated areas.

“We have hosted 50,000 Syrians in the past few years for humanitarian reasons,” Kacimi said, alluding to refugees from Syria’s civil war, “but we cannot accept members of armed groups fleeing from Syria when it comes to our security.”

He said around 100 had reached the southern border with the help of local armed escorts in recent weeks but were intercepted and expelled shortly after they slipped into Algeria.

Kacimi said these Syrians had transited Turkey, Jordan, Egypt, Sudan and Niger or Mali using fake Sudanese passports.

“Definitely this is a criminal network and we must be very vigilant not to allow them get into Algeria,” he said.

Algeria has kept diplomatic relations with Syria throughout its own civil war, in which President Bashar al-Assad has largely defeated rebels and jihadists trying to topple him. Syrians do not need visas to enter Algeria.

Algeria’s south and southeast are largely empty desert regions but it has beefed up its security presence there after neighboring Libya and northern Mali and Niger fell into the hands of various militant and rebel factions.

Since its 1990s civil war, Algeria has become an important U.S. ally against Islamist militants active in the arid Sahel region of north and west Africa.