ALGIERS (Reuters) - The United States is “watching very carefully” for Islamic State militants operating outside Sirte as the jihadist group faces defeat in its former North African stronghold, a senior U.S. Department of State official told Reuters.

A military vehicle fires as fighters of Libyan forces allied with the U.N.-backed government push into the last area held by Islamic State militants in Ghiza Bahriya district in Sirte, Libya November 26, 2016. REUTERS/Hani Amara

Libyan forces have been battling Islamic State in Sirte for more than six months and have reduced the amount of ground held by its fighters to a small cluster of buildings near the city’s Mediterranean sea front.

Since Aug. 1 the forces, led by brigades from the western Libyan city of Misrata, have been backed by U.S. air strikes.

“They have made a great deal of progress, but the fight has been quite severe and the Libyan forces have taken a lot of casualties,” said Marie Richards, the Department of State’s deputy counterterrorism coordinator for regional and multilateral affairs.

“We are very confident that in a short period they will be able to eliminate the threat coming out of Sirte.”

However, Richards said that there will inevitably be elements that disperse throughout Libya. “We are watching very carefully where they go,” she added.

Libyan officials and commanders say that some Islamic State militants fled Sirte in the early stages of the campaign there. Though Sirte was the only Islamic State-controlled city in Libya, the group has a presence in other parts of the country.

The battle in Sirte comes as Islamic State is also on the defensive against U.S.-backed campaigns in Syria and Iraq, including in the biggest city of its self-declared Caliphate, Mosul.

“ISIS is also declining in Iraq and in Syria. In that area but also in Libya we are seeing the fighters being squeezed,” Richards said, using an acronym for Islamic State.

“But people are recruited at home and they can still carry out terrorist attacks at home without traveling ... the threat from Daesh (Islamic State) will continue, it just will take different forms.”

Speaking during a visit to Algiers, Richards also praised Algeria’s role in organizing a counter-terrorism conference in the Algerian capital this week.

The conference has led to “a lot of sharing information and discussions, particularly the issue of terrorists returning home”, she said.

Algeria has become a key regional partner for Western counter-terrorism efforts since emerging from a conflict with Islamist militants in the 1990s that left as many as 200,000 dead.