Islamic State of Iraq and Syria (ISIS) militants burned a captured Jordanian pilot to death in a cage, according to a purported video of the violence released Tuesday. The kingdom, which had vowed a swift and lethal response, executed two al-Qaeda prisoners by hanging early Wednesday.

The pilot's gruesome death sparked outrage and anti-ISIS group demonstrations in Jordan. The video emerged after a weeklong drama over a possible prisoner exchange for a female al-Qaeda operative imprisoned in Jordan who was one of the two prisoners executed.

The Jordanian military confirmed the death of 26-year-old Lt. Muath Al-Kaseasbeh, who was captured by the extremists in December when his F-16 crashed while he was flying a mission as part of the U.S.-led air campaign against the Islamic State group.

He was the first airman participating in the U.S.-led bombing raids against militant positions in Syria and Iraq to be captured.

In Washington, Jordan's King Abdullah II and President Barack Obama vowed in a hastily arranged White House meeting not to let up in the fight against ISIS. Jordan, a staunch Western ally, is a member of the coalition.

Lt. Muath al-Kaseasbeh, 26, fell into the hands of ISIS militants in December when his Jordanian F-16 crashed near Raqqa, Syria. (Raqqa Media Center of the Islamic State group/Associated Press)

In a first response to the killing of the pilot, Jordan executed Sajida al-Rishawi and Ziad al-Karbouly, two Iraqis linked to al-Qaeda, government spokesman Mohammed al-Momani said. Another official said they were executed by hanging.

The executions took place at Swaqa prison about 80 kilometres south of the Jordanian capital of Amman. At sunrise, two ambulances carrying the bodies of al-Rishawi and al-Karbouly drove away from the prison with security escorts.

Over the past week, Jordan had offered to trade al-Rishawi, a failed suicide bomber, for the pilot, but froze any swap after failing to receive any proof that the pilot was still alive. Jordanian TV said the pilot was killed as long ago as Jan. 3.

Al-Rishawi had been sentenced to death after her 2005 role in a triple hotel bombing that killed 60 people in Amman orchestrated by al-Qaeda in Iraq, the predecessor of the Islamic State group. Al-Karbouly was sent to death row in 2008 for plotting terror attacks on Jordanians in Iraq.

Al-Kaseasbeh had fallen into the hands of the militants when his F-16 crashed near Raqqa, Syria, the de facto capital of the group's self-styled caliphate.

In the 20-minute video purportedly showing his killing, he displayed signs of having been beaten, including a black eye. Toward the end of the clip, he is shown wearing an orange jumpsuit. He stands in an outdoor cage as a masked militant ignites a line of fuel leading to it.

The video, which threatened other purported Jordanian pilots by name, was released on militant websites and bore the logo of the extremist group's al-Furqan media service. The clip featured the slick production and graphics used in previous Islamic State videos. The video could not immediately be confirmed independently by The Associated Press.

The killing of the 26-year-old airman appeared aimed at pressuring the government of Jordan — a close U.S. ally — to leave the coalition.

Jordan's role in a bombing campaign targeting Muslims is not popular in Jordan. However, some said the extremists' brutal killing of a fellow Muslim could galvanize resentment against them among fellow Sunni Muslims in the region.

At their White House meeting, the Jordanian monarch and Obama affirmed that "the vile murder of this brave Jordanian will only serve to steel the international community's resolve to destroy ISIL," said White House spokesman Alistair Baskey, using an alternate acronym for the extremist group.

Abdullah, who was on a previously scheduled trip to Washington, arrived after nightfall Tuesday and made no remarks to reporters as he and Obama sat side by side in the Oval Office.

In a statement before his meeting with Abdullah, Obama vowed the pilot's death would "redouble the vigilance and determination on the part of our global coalition to make sure they are degraded and ultimately defeated."

Abdullah has portrayed the campaign against the extremists as a battle over values. In a speech Tuesday night on Jordanian state television, he urged his countrymen to unite.

"It's the duty of all of us to stand united and show the real values of Jordanians in the face of these hardships," Abdullah said. The official Petra news agency said he would be cutting short his Washington trip to return to Jordan.

The army spokesman, Mamdouh al-Ameri, said the country would strike back hard. "Our punishment and revenge will be as huge as the loss of the Jordanians," he said.

Jordan faces increasing threats from the militants. Jordan borders areas of ISIS's self-declared caliphate in Syria and Iraq, while there are have been signs of greater support for the group's militant ideas among Jordan's young and poor.

The pilot's father, Safi Yousef al-Kaseasbeh, was attending a tribal meeting in Amman when news of the video surfaced, and he was seen being led from the session. Other men were seen outside, overcome with emotion.

After word spread that the pilot had been killed, dozens of people chanting slogans against ISIS marched toward the royal palace to express their anger. Waving a Jordanian flag, they chanted, "Damn you, Daesh!" — using the Arabic acronym of the group — and "We will avenge, we will avenge our son's blood."

Killings linked to military setbacks?

Protesters marched in the pilot's home village of Ai and set a local government office on fire. Witnesses said the atmosphere was tense and that riot police patrolled the streets.

Al-Kaseasbeh is from a tribal area in southern Jordan's Karak district. The tribes are considered a mainstay of support for the monarchy, but the pilot's capture has strained that relationship. Members of the pilot's family have repeatedly accused the government of botching efforts to win his release and have also criticized Jordan's participation in the anti-Islamic State group alliance.

ISIS has released a series of gruesome videos showing the beheading of captives, including two American journalists, an American aid worker and two British aid workers. Tuesday's was the first to show a captive being burned alive.

David L. Phillips, a former State Department adviser on the Middle East, said he believes the pilot's killing could backfire, antagonizing Sunnis against the extremists, including Sunni tribes in Iraq.

"They need to have a welcome from Sunni Arabs in Anbar Province (in Iraq) to maintain their operations," said Phillips, director of the Program on Peace-building and Human Rights at Columbia University.

He said the extremist group's recent military setbacks may have fuelled the killings. "They need to compensate for that with increasingly gruesome killings of prisoners," he said.

The latest video was released three days after another video showed the purported beheading of a Japanese journalist, Kenji Goto, who was captured by the Islamic State group in October.

The militants had linked the fates of the pilot and the journalist. A second Japanese hostage was apparently killed earlier last month.

The U.N. Security Council in a statement condemned the "brutality of ISIL, which is responsible for thousands of crimes and abuses against people from all faiths, ethnicities and nationalities, and without regard to any basic value of humanity."