Jordan border post Iraq
A Jordanian military helicopter flies over an armored vehicle near the Karameh crossing on the Jordan-Iraq border near Ruweished. Reuters/Muhammad Hamed

In the wake of the Islamic State group's capture and gruesome murder of Jordanian pilot Muath al-Kaseasbeh, Jordan's government is faced with an even harsher reality: The militant group may already have gained a foothold in the kingdom, by recruiting extremists who once fought alongside al Qaeda and have extensive military training.

Less than 24 hours after the release of the video showing al-Kaseasbeh being burned alive, Jordan executed in retaliation two Islamist extremists already condemned to death, Sajida al-Rishawi and Ziad al-Karbouli. The executions are just one part of Jordan's fight not only to avenge the Islamic State's brutality, but combat its influence inside the country.

Over the past seven months, Jordan has carried out several measures to quell Islamic extremism in the country in fear that it would breed support for the Islamic State group, also known as ISIS or ISIL.

Authorities are renewing their efforts to track Islamists who fought with al Qaeda against the U.S. during the Iraq War, some alongside Abu Musab al-Zarqawi, a Jordanian who was the founder of al Qaeda in Iraq, a precursor to ISIS. Previously, in the 1990s, he started the al-Tawhid paramilitary organization, which was dedicated to overthrowing the Hashemite monarchy and installing an Islamist regime in Jordan. He was killed by the Americans in 2006, but his legacy still resonates among extremists in the country.

According to a report published recently by the Carnegie Endowment for International Peace, as a result of the emergence of ISIS, Jordan has beefed up border security, arrested potential supporters of terrorism and tightened state control over mosques.

In June the government passed a controversial counterterrorism law giving authorities new powers to imprison "citizens who lend ideological and recruitment support to terrorist organizations." In November, authorities arrested one of the leaders of Jordan's Muslim Brotherhood, Saki Bani Irsheid. The arrest spurred demonstrations in Amman; protesters claimed Irsheid was wrongly imprisoned.

Irsheid is just one of dozens who have been arrested in Jordan on suspicion of supporting terrorism. Jordanian courts have moved swiftly to arrest and fine those who show even the slightest sign of support for Islamic extremism.

Jordan's military has also fought off attacks by Sunni militants linked to ISIS. In December militants destroyed at least six Jordanian control posts on the border with Iraq, according to Jordanian activists and fighters associated with ISIS. The attacks marked the first time since June the Sunni militant group had tried to enter Jordan from western Iraq, much of which it controls.

Political organizations and think-tank groups in Jordan say ISIS has yet to become a public talking point among politicians. There is virtually no discussion of extremism in the public sphere, said Uli Wacker, director of the Friedrich Naumann Foundation, a political think tank in Amman.

"It's not the decisive factor when it comes to political parties or to policy reform," he said. "This is not a country that is dominated by an ISIS agenda." Yet while politicians dodge discussion of extremism in the country, some say that ISIS may be ultimately defeated in Jordan by its own brutality, rather than by a crackdown.

Following al-Kaseasbeh's death, people from the south of Jordan, home to his tribe, called on the government to do more to respond to ISIS barbarity.

Matthew Levitt, an expert on Jordan at the Washington Institute for Near East Policy, wrote Wednesday that the killing of al-Kaseasbeh could hurt ISIS recruitment of Jordanians.

"More than anything we in the West can say or do, more than any counter-radicalization campaign, it is ISIS's own actions that undermine its credibility and standing among fellow Muslims and blunt its magnetism," he wrote. The al-Kaseasbeh killing "may well mark the beginning of the end for a group that will eventually rot from the inside out."