SINJAR, Iraq — 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 like a winning day in the war against the Islamic State, also known as ISIS or ISIL, 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 faces 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. 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. “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 Iraqi 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.

In 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 the province. “Daesh lost Baiji, and lost Sinjar, and now day by day they are losing Ramadi,” he said, using an alternative name for the Islamic State.

“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, U.S.-backed Syrian Democratic Forces are preparing for an attack on the town of al-Hawl, while a U.S.-led coalition air operation, dubbed Tidal Wave II, has targeted the Islamic State’s oil infrastructure, disrupting the group’s ability to fund its operations.

“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 the experiences of other terrorist groups have shown.

Since 2010, al-Shabab, an al-Qaida 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. Earlier this year, al-Shabab claimed responsibility for an attack at a Kenyan university 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 on Oct. 31, Islamic State militants have killed more than 400 people outside their self-proclaimed state.

Only subscribers are eligible to post comments. Please subscribe or to participate in the conversation. Here’s why.

Use the form below to reset your password. When you've submitted your account email, we will send an email with a reset code.