As European governments scramble to contain the expanding terrorist threat posed by the Islamic State, on the battlefield in Iraq and Syria the group is a rapidly diminishing force.

In the latest setbacks for the militants on Thursday, Syrian government troops entered the outskirts of the historic town of Palmyra after a weeks-old offensive aided by Russian airstrikes, and U.S. airstrikes helped Iraqi forces overrun a string of Islamic State villages in northern Iraq that had been threatening a U.S. base nearby.

These are just two of the many fronts in both countries where the militants are being squeezed, stretched and pushed back.­Nowhere are they on the attack. They have not embarked on a successful offensive in nearly nine months. Their leaders are dying in U.S. strikes at the rate of one every three days, inhibiting their ability to launch attacks, according to U.S. military officials.

[New ISIS recruits have deep criminal roots]

Front-line commanders no longer speak of a scarily formidable foe but of Islamic State defenses that crumble within days and fighters who flee at the first sign they are under attack.

On March 14, Russian President Vladimir Putin announced that Russia would begin pulling its military from Syria, potentially winding down nearly six months of airstrikes. The alliance between Russia and the regime of Bashar al-Assad goes back decades. Here's a bit of historical context that explains why Russia was fighting to prop up its closest ally in the Middle East. (Ishaan Tharoor and Jason Aldag/The Washington Post)

“They don’t fight. They just send car bombs and then run away. And when we surround them, they either surrender or infiltrate themselves among the civilians,” said Lt. Gen. Abdul-Ghani al-Assadi, commander of Iraq’s counterterrorism forces, who is overseeing the latest Iraqi offensive to capture the town of Hit in Anbar province.

“Their morale is shaken. We listen to them on their communications devices. Their leaders are begging them to fight, but they answer that it is a lost cause. They refuse to obey orders and run away.”

The group still controls big swaths of territory and could potentially prove as deadly in defeat as it was when it was on the offensive. Strikes in Belgium, Turkey and France may herald the tip of an iceberg of militant networks that have already infiltrated Europe, law enforcement officials fear.

Whether the recent strikes are a response to the battlefield setbacks, as some U.S. officials have said, or an inevitable consequence of the global “jihad” precipitated by the extremists’ ascent is hard to tell. Recent weeks have seen a revival in Iraq as well as Syria of the suicide bombings and hit-and-run assaults that do not win ground but are deadly to people otherwise living beyond militants’ reach. Scores have been killed in suicide bombings in Damascus and Baghdad this year.

[8 stories you should read to really understand the Islamic State]

But U.S. military officials say they believe that after more than 18 months, the military campaign has found its stride.

“As time goes on, as our systems mature, we’re becoming more effective,” said Col. Steve Warren, the U.S. military’s spokesman in Baghdad for the campaign. “We’ve become much better at spotting them. Anytime they try to move, we’re able to find and finish them. They can’t move, ­haven’t won any battles for a long time, and they’ve got difficulty leading because we’re hitting their leaders.”

1 of 32 Full Screen Autoplay Close Skip Ad × Inside Syria View Photos As the conflict enters its fifth year, Aleppo, Syria’s most populous city, has been sliced in two by the war and in the capital Damascus, there is little sign of the anniversary on the streets. Caption As the conflict enters its fifth year, Aleppo, Syria’s most populous city, has been sliced in two by the war and in the capital Damascus, there is little sign of the anniversary on the streets. March 10, 2016 A souk, or open-air market, in the old city of Aleppo. Lorenzo Tugnoli/For The Washington Post Buy Photo Wait 1 second to continue.

It is not only the U.S.-backed effort that is gaining momentum. Russian airstrikes played a major part in facilitating the Syrian army’s entry into historic Palmyra, which was snatched by the Islamic State nearly a year ago during its last major burst of offensive activity.

Syrian forces helped by Russian strikes also have made gains around the Islamic State stronghold of Bab, east of Aleppo, and are making inroads on the southwestern outskirts of Raqqa province. It is unlikely, but not implausible, that the Syrian army will reach Raqqa before U.S.-backed forces do, U.S. officials say.

[How the battle against the Islamic State is redrawing the map of the Middle East]

Most of the advances, however, are being made by the assortment of loosely allied forces, backed to varying degrees by the United States, that are ranged along the vast perimeter of the Islamic State’s territories. They include the Kurdish People’s Protection Units, or YPG, in northeastern Syria; the Kurdish peshmerga in northern Iraq; the Iraqi army, which has revived considerably since its disastrous collapse in 2014; and Shiite militias in Iraq, which are not directly aligned with the United States but are fighting on the same side.

The U.S. military estimated earlier this year that the Islamic State had lost 40 percent of the territory it controlled at its peak in 2014, a figure that excludes the most recent advances.

In Anbar province, a newly regenerated Iraqi army is advancing along the Euphrates Valley toward the town of Hit and has captured more than 25 miles of territory in the past week.

In eastern Syria, the seizure late last month of the town of Shadadi by the Kurdish YPG — aided by U.S. Special Forces — was accompanied by the capture of nearly 1,000 square miles of territory.

Although the town had not been headlined as an Islamic State stronghold, it has long been known in Syria as an epicenter of extremism and a major source of Syrian jihadist fighters against U.S. troops during the U.S. occupation of Iraq. Most recently, it had served as a key supply and staging area for battlefronts in both Syria and Iraq, and it was there that one of the most powerful and effective of the Islamic State’s leaders, Omar al-Shishani, was killed in a U.S. airstrike this month.

[The Islamic State’s ‘emir of war’ dies of wounds suffered in U.S. airstrike]

The operation was planned to take place over weeks. Instead, the town fell within days, said a senior U.S. administration official, who spoke on the condition of anonymity to talk candidly.

“Shadadi was going to be a major six-week operation,” he said. “The ISIS guys had dug trenches and everything. Instead, they completely collapsed. They’re collapsing town by town.”

The biggest constraints on further military advances now are largely political, U.S. officials say. Progress on important fronts such as reconciliation in Iraq and diplomatic efforts to end the war in Syria are not keeping pace with the advances on the battlefield, stalling plans to take the fight to the Islamic State’s most vital strongholds.

Plans for an operation to capture Raqqa, the de facto capital of the Islamic State’s self-styled ­caliphate, are on hold because of tensions between Kurds and ­Arabs over who would participate and how to govern the city after it has been taken. The YPG has declared a breakaway federal region that does not include Raqqa, while U.S. plans to train and equip an Arab force to fight for the town are lagging.

Likewise, preparations for an offensive for Mosul, the biggest city under Islamic State control, are being held up by disputes over who should take part and how to govern the northern Iraqi city after it falls. The powerful Shiite militias, credited with making many of the earliest gains, are insisting they be given a role, over objections from the U.S. military and the Iraqi Kurdish peshmerga.

“We could probably liberate Mosul tomorrow, but we would have a real mess on our hands if we did,” said Michael Knights of the Washington Institute for Near East Policy. “A lot of work needs to be done to ensure an orderly transition of power in Mosul.”

The Iraqi army described Thursday’s operation outside the northern Nineveh province town of Makhmour as the start of the Mosul offensive. U.S. and Kurdish officials, however, said it was a far more limited operation, to drive the Islamic State out of a string of villages that have been threatening U.S., Iraqi and Kurdish peshmerga troops based in the town. A U.S. Marine based in Makhmour died in rocket fire on Saturday.

[A U.S. Marine is killed in Iraq, the second combat casualty of the ISIS war]

An Iraqi army officer in Makhmour, who spoke on the condition of anonymity because he was not authorized to talk to reporters, said troops encountered little resistance, overrunning five mostly empty villages as militant fighters retreated.

The Islamic State continues to defend when it is attacked and shows no sign that it is losing cohesion in its core territories — but it is starting to become possible to foresee the group’s ultimate defeat, said Knights, who thinks that could come by the end of next year.

“They are starting to fall apart,” he said. “They’re a small movement. If you bring them under pressure on half a dozen battlefields at the same time, they can’t do it.”

Mustafa Salim in Baghdad contributed to this report.

Read more:

Operation launched against Islamic State near base where U.S. Marine killed

Inside the surreal world of the Islamic State’s propaganda machine

American ISIS fighter captured by Kurds: ‘I found it hard’

Today's coverage from Post correspondents around the world