WASHINGTON: For months, IS rampaged across Syria and Iraq, seizing cities, taking hostages and terrorizing all who dared to confront them.

The tide began to turn in mid-August, when US airstrikes pushed them from key Iraqi battlegrounds. Then, on Aug. 19, the group released a video that showed the beheading of American freelance journalist James Foley. The pattern continued.

Within days of a military defeat, the group would release images of more beheadings — at least nine over six weeks — of Western journalists, aid workers and Muslim soldiers.

The tactic signals that even as the IS group suffers battlefield losses, it is holding on to its edge in the propaganda war. US officials say that’s the only way the militants can continue to maintain support and attract new recruits.

“Certainly since the bombing campaign, the reverses, they’re no longer boasting of taking places — because they’re not taking places. They’re losing places,” Alberto Fernandez, who heads the State Department’s office for counterterrorism propaganda, said in a recent interview. “So what do they do? They boast about cutting people’s heads off. They’re trying to substitute that for military victory.”

That may be some propaganda by the US itself. But the trend still is frightening, considering the IS group is holding what US intelligence officials believe are as many as 20 hostages, including at least two Americans.

This past week, the militants suffered a series of setbacks, with U.S. and allied airstrikes Friday hitting Syrian oil refineries and a training camp. Earlier strikes pushed militants back from some of their positions in Iraq.

But the Islamic State group this past week also besieged the Iraqi town of Hit and ambushed an Iraqi army unit north of Ramadi, kept its tight grip on Fallujah, and closed in on the Syrian town of Kobani.

In the video of Henning’s beheading, a masked militant warns the U.S. that the gruesome attacks on individuals will continue as long as the airstrikes do. He also threatened that an American hostage, identified as Peter Kassig, would be next. “It is only right that we continue to strike the neck of your people,” the masked militant said.

Violence has been a focal point of Islamic State group propaganda, to show the militants’ might and recruit the thousands of foreign fighters who have rushed to join them. When they captured Mosul, Iraq, in June, they beheaded Iraqi security forces, raped women and terrorized residents into following an extreme form of Islamic Sharia law.

But the group had held Western hostages for months and, in some cases, even years. Not until the airstrikes began, weakening the group’s momentum, did the extremists start beheading the white Westerners.

In the Foley video, an unidentified fighter warned that American journalist Steven Sotloff would be next if the U.S. campaign did not stop. The airstrikes continued, and Sotloff was beheaded in a video released Sept. 2, two days after the U.S. helped force the Islamic State group from Amirli, Iraq.

From Sept. 7-9, U.S. airstrikes pounded militant positions around Haditha, Iraq. On Sept. 11, British Prime Minister David Cameron announced that his government was considering using air power against the Islamic State group in Syria.

On Sept. 13, the Islamic State group released a video of the beheading of British humanitarian aid worker David Haines. The unidentified killer said Haines was paying the price for Britain’s decision to supply weapons to Kurdish peshmerga fighters, and he mentioned the Haditha strikes.

The group has released videos or pictures of beheadings of Kurdish fighters, including several recently captured in clashes near the Syria-Turkey border. All the images came out after the Islamic State group was attacked or suffered setbacks in Kurdish areas in northern Iraq and Syria.

The group “wants to create the impression of victory and demoralize its Kurdish enemies,” the Clarion Project, a Washington-based organization that tries to counter Islamic extremism, said in an Aug. 28 alert about the beheading of a Kurdish soldier.

The militants also claim to have beheaded two Lebanese soldiers kidnapped during a raid on the Lebanese border town of Arsal in August. One of the victims was a Sunni Muslim; that’s important because it belies Islamic State propaganda that it is creating a religious empire, or caliphate, for faithful Sunnis.