AMMAN, Jordan — King Abdullah II returned here to an unexpectedly warm welcome on Wednesday, as cheering crowds expressed support for the country’s swift executions of two terrorist prisoners in retaliation for the Islamic State’s grisly killing of a Jordanian pilot.

The latest atrocity by the Islamic State was met with revulsion and outrage across the Arab world, with a leading Sunni imam calling for the extremists to suffer the same kind of harsh punishments they had meted out.

The Jordanian state news agency Petra confirmed that two Iraqis already on death row here, a would-be suicide bomber, Sajida al-Rishawi, and a former top lieutenant of Al Qaeda in Iraq, Ziad al-Karbouli, were executed Wednesday at dawn, less than 12 hours after the Islamic State released a video that showed the Jordanian pilot, First Lt. Moaz al-Kasasbeh, being burned alive inside a cage.

Jordan has 100 more prisoners on death row, but only three are known to have been convicted of terrorism offenses.