Jordan executed two al Qaida prisoners by hanging, after Islamic State (IS) militants put to death a captured fighter pilot by burning him alive in a cage.

The pilot's gruesome death sparked outrage and street demonstrations in Jordan, where the country's participation in the anti-IS coalition has not been popular.

The video emerged after a week-long drama over a possible prisoner exchange for a female al Qaida operative jailed in Jordan who was one of the two prisoners executed.

The Jordanian military confirmed the death of 26-year-old Lt Moaz al Kasasbeh, who was captured by the extremists in December when his F-16 crashed while he was flying a mission as part of the US-led air campaign against IS.

He was the first airman participating in the bombing raids against IS positions in Syria and Iraq to be captured by the militants.

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 IS.

Sajida al-Rishawi, an Iraqi woman, was executed before daybreak today, along with another prisoner, Zaid al-Karbouly, also linked to al Qaida, said government spokesman Mohammed al-Momani.

The executions took place at Swaqa prison about 50 miles 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 January 3.

Al-Rishawi had been sentenced to death after her 2005 role in a triple hotel bombing in Amman that killed 60 people. Al-Karbouly was sent to death row in 2008 for plotting terror attacks on Jordanians in Iraq.

Al Kasasbeh had fallen into the hands of the militants in December 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.

Towards 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 killing of the 26-year-old airman appeared aimed at pressuring the government of Jordan - a close US ally - to leave the coalition that has carried out months of airstrikes targeting IS positions in Syria and Iraq.

But the extremists' brutality against a fellow Muslim could backfire and galvanise other Sunni Muslims in the region against them.

At their White House meeting, the Jordanian monarch and Mr 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 acronym for the extremist group.

King Abdullah has portrayed the campaign against the extremists as a battle over values.

But Jordan also faces increasing threats from the militants. Jordan borders areas of IS' 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 video was released three days after another video showed the purported beheading of a Japanese journalist, Kenji Goto, who was captured by IS in October.

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

In Japan, Prime Minister Shinzo Abe condemned the pilot's killing as "a despicable terrorist activity".

He said: "From our hearts, we express solidarity with the Jordanian government and people.

"We will not give in to terrorism. Our country will actively contribute, along with the international community, and we will fulfil our responsibility in the international community to fighting terrorism."