— Just hours after his men helped recapture the northern Iraqi town of Sinjar from Islamic State militants last week, Maj. Gen. Ali Ahmed, an officer with Kurdish security forces, watched another battle unfold on his television, this one some 2,500 miles away in Paris.

What had seemed a winning day in the war against the Islamic State had taken a horrific turn, with attacks in the French capital that left 129 people dead.

The victory by Kurdish forces in Sinjar was just one in a string of losses for the militant group as it faced attacks on multiple fronts — from Ramadi in Iraq to Raqqa in Syria.

But the squeeze on Islamic State territory has coincided with an uptick in the group’s operations overseas.

Scores of hostages, including Westerners, have been killed by the Islamic State since 2014.

That’s no coincidence, according to some analysts, who expect the Islamic State to lash out with more attacks abroad to divert attention from its territorial losses.

“Their recruiting appeal is based on the appearance of strength, and that informs a lot of their strategy,” said J.M. Berger, co-author of “ISIS: The State of Terror” and a fellow at the Brookings Institution.

From the outset, the Islamic State has been acutely aware of its international image, with its slickly produced videos of beheadings and massacres a key part of attracting recruits.

“The brothers launched the attack in Paris to prove that we are a strong state and we can fight our enemies anywhere,” said one Islamic State sympathizer in Turkey who declined to be named because of links to the terrorist group. “Since they are fighting us in our land, we are going to fight them in their lands.”

At its peak last year, the Islamic State had seized about a third of Iraq’s territory, but it has lost about a third of that.

After more than a year of bloody battles, pro-government forces wrested control of the oil refinery of Baiji in October.

The Washington Post's Loveday Morris reports from the ground as Kurdish forces launch an offensive against the Islamic State. (Jason Aldag/The Washington Post)

Around Ramadi, Iraqi security forces have steadily progressed in recent months and have encircled the city, according to Iraqi commanders.

“The city is besieged 360 degrees,” said Maj. Gen. Thamir Ismail, commander of SWAT forces in Ramadi’s province, ­Anbar. “Daesh lost Baiji and lost Sinjar, and now day by day they are losing Ramadi,” he said, using an Arabic term for the Islamic State, which is also known as ISIS and ISIL.

“They attacked Paris in order to keep up the morale of their fighters and distract from their losses in Syria and Iraq,” he said. “I expect that when we liberate Ramadi, there will be more attacks in Europe.”

Across the border, the U.S.-backed Syrian Democratic Forces are preparing for an attack on the town of Hawl, while Tidal Wave II, an air operation by the U.S.-led coalition, has targeted the Islamic State’s oil infrastructure, disrupting the group’s ability to fund its operations, according to U.S. officials.

“We are conducting a very comprehensive, thought-out campaign targeting and attacking ISIL at multiple locations across both Iraq and Syria,” Col. Steve Warren, a U.S. military spokesman, said in a briefing last week. “What we’re doing is applying simultaneous pressure to ISIL across the entire battlefield.”

But a loss of territory could herald an era of relatively low-cost but high-profile attacks overseas, analysts said, as experience with other terrorist groups has shown.

Since 2010, al-Shabab, an al-Qaeda offshoot in Somalia, has been pushed out of its urban strongholds. But instead of concentrating on holding ground, the group has refocused efforts on hitting soft targets. Al-Shabab asserted responsibility for an attack at a Kenyan university this year that left nearly 150 people dead.

“The recent example of al-
Shabab strongly suggests that a catastrophic loss of territory will free up resources for large-scale terrorist attacks, both regionally and globally,” Berger said. “Even a small insurgency makes for a massive terrorist group when its resources are no longer needed to hold ground.”

Berger said the Islamic State’s “apocalyptic bent” makes it particularly concerning: “While defeating ISIS on the ground will likely reduce its appeal globally, people should not think it’s going to reduce terrorism in the short or medium term.”

Since a Russian jetliner crashed in the Sinai Peninsula on Oct. 31, Islamic State militants have killed more than 400 people outside their self-proclaimed state.

Hassan Hassan, co-author of “ISIS: Inside the Army of Terror” and an analyst at Chatham House, said the attacks are indicative of the group’s growing international reach.

“For many, it looks like ISIS has shifted its focus abroad,” he said. However, the Paris attacks and the Russian jetliner bombing “are only signs that the group’s planning is developing.”

Regardless, “worse or sustainable attacks are expected,” he said.

Mustafa Salim in Baghdad contributed to this report.

Read more:

The long war against Islamist extremism has become more complicated than ever

In an Islamic State prison, he had no hope. But then he heard the drones.

2015 has seen six terror attacks deadlier than Paris