BAGHDAD -- A year after it was routed from Iraq in a devastating war that left entire neighborhoods and towns in ruins, the Islamic State group is fighting to hang on to its last enclave in eastern Syria, engaging in deadly battles with U.S.-backed forces.
Cornered in the desert near the Iraqi border with nowhere to run, the militants are putting up a fierce fight, inflicting hundreds of casualties among their opponents and releasing a stream of beheading videos reminiscent of the extremist group's terrifying propaganda at the height of its power.
The battle for Hajin has dragged on for three months, highlighting the difficulty of eradicating an extremist group determined to survive. In Iraq, there is rising concern that the group may stage a comeback. IS sleeper cells have recently launched deadly attacks against security forces and kidnapped and killed civilians, mostly in four northern and central provinces that were once part of the group's self-declared caliphate.
"There is still major danger for Iraq and Syria especially in areas close to the border when it comes to Daesh," a senior Iraqi intelligence official said, using an Arabic acronym to refer to the extremists. He spoke on condition of anonymity because he was not authorized to speak to media about security matters.
He said IS lost most of the income it once made from oil and taxes imposed in areas it controlled. The group now relies on selling gold and other reserves that they had accumulated after declaring their caliphate in June 2014. He said the money is being used to buy weapons and finance attacks in Iraq and Syria.
Another Iraqi intelligence official said IS has begun restructuring its command, relying more on non-Iraqi commanders after most of its leaders were killed in coalition strikes.
The Islamic State group once held an area the size of Britain across vast territories straddling parts of Iraq and Syria, running a so-called caliphate and planning international attacks from its headquarters in the Syrian city of Raqqa. Tens of thousands were killed in both countries as an array of local forces, some backed by a U.S.-led coalition, eventually drove the extremists out of virtually all the lands they once held.
Iraq's then-Prime Minister Haider al-Abadi declared final victory over the group on Dec. 9, 2017. Two months earlier, the coalition, working with Kurdish-dominated fighters known as the Syrian Democratic Forces, liberated Raqqa after a bombing campaign that decimated much of the city.
The area that IS still holds in Syria represents less than 1 percent of the territory it controlled at its height. The pocket is home to some 15,000 people, including IS fighters and their families. The U.S. military estimates there are about 2,000 remaining IS fighters there.
The SDF launched their offensive to retake Hajin on Sept. 10. It has been a grueling campaign, with sand storms and fog at times grounding coalition aircraft, allowing the militants to launch counter-offensives that have killed hundreds of SDF fighters. IS has also taken scores of prisoners and hundreds of civilians hostage.
"It is very difficult because we are in the last stages, where almost every ISIS fighter is a suicide belt," Brett McGurk, the White House envoy for the war against IS, said at a security conference held recently in the Gulf nation of Bahrain.
The extremists, besieged near the border, have no place to go. They are surrounded from the east and north by SDF fighters while from the south and west, Syrian government forces and their allies have closed roads to the surrounding desert.
The Britain-based Syrian Observatory for Human Rights says since the fighting began nearly three months ago, 1,616 people have been killed, mostly fighters from both sides. It said the dead include 827 IS gunmen, 481 SDF fighters and 308 civilians.
The fighting is now believed to be in its final stages, with SDF fighters said to have broken IS defenses and taken the fight inside the town.
The fall of Hajin will end the group's hold over any significant territory in Iraq or Syria, but sleeper cells in both countries will continue to stage attacks amid attempts to regroup. IS affiliates in Libya, Afghanistan and Egypt's Sinai Peninsula continue to stage regular attacks.
The group's savage legacy, meanwhile, will stay for years to come.
Huge parts of Iraq and Syria are still in ruins, with little cash and -- in Syria's case -- little international political will to rebuild.
Emerging from the more than three years of war, Iraq estimates that $88.2 billion is needed to rebuild the country. An international donors' summit held early this year in Kuwait gathered pledges of $30 billion that mainly came in the form of loans, but no progress has been made to fulfill the pledges.
"The biggest problem we have is the lack of funds," said Mustafa al-Hiti, the head of a government-run reconstruction fund.
"What we spent till now is about 1.5 percent of what we need and that came as loans and donations," al-Hiti added.
Another challenge is the unexploded ordnance, mainly in the northern city of Mosul, where the climactic battle occurred. He estimated that 4 million unexploded bombs are still littered around Mosul, the largest city IS once held, with only 6 percent cleared so far.
Nuri Mehmud, an SDF spokesman speaking by telephone from Syria, said all of IS' experienced fighters are now in the besieged area of Hajin.
"It is a difficult battle but in the end we will wipe out Daesh," he said.
Mroue reported from Beirut. Associated Press writer Sinan Salaheddin in Baghdad contributed.
This article was written by Qassim Abdul-Zahra and Bassem Mroue from The Associated Press and was legally licensed through the NewsCred publisher network. Please direct all licensing questions to email@example.com.