Hundreds of protesters gather for a demonstration to protest alleged police brutality in Maan, Jordan, on Wednesday. Demonstrators unfurled black banners in the second public showing of support for ISIS in the kingdom in less than a week. (Taylor Luck/for The Washington Post)

Demonstrators angry with Jordan’s government have unfurled in this desert city the black battle flags of the al-Qaeda-inspired extremists now in control of large swaths of Iraq, stirring fears that support for the group is growing in Jordan.

At two rallies in Maan this week, scores of young men, some in black masks, raised their fists, waved home-made banners bearing the logo and inscriptions of the Islamic State of Iraq and Syria (ISIS) and shouted, “Down, down with Abdullah,” the king of Jordan. Abdullah II, a close U.S. ally, is widely viewed as a moderate in a country considered an oasis of stability in the Middle East.

The demonstrations have been the first public displays of support for ISIS in Jordan.

Abdullah’s government has put the country’s border guard on alert, reinforced troops along its 125-mile frontier with Iraq and added tanks and armor to thwart any move into Jordan by the ISIS militants, who, along with Sunni insurgents, have seized a string of cities from northern Syria to western Iraq.

But more troubling to the Amman government than the possibility of an ISIS invasion are signs that support for the group may be expanding here and that homegrown recruits could take action in Jordan, according to former military officers, security analysts and members of Jordan’s jihadist movement.

1 of 53 Full Screen Autoplay Close June 26, 2014 June 25, 2014 Wednesday June 24, 2014 Tuesday June 23, 2014 Monday June 22, 2014 Sunday Skip Ad × John F. Kerry visits Iraq as violence spreads View Photos Secretary of State John F. Kerry conferred with Kurdish leaders in northern Iraq as fighters from local Sunni tribes wrested control of at least part of Iraq’s largest oil refinery after battling for days with government troops over the key facility. Caption Members of an all-volunteer force undergo training in the holy city of Karbala to protect Shiite shrines and help counter the recent gains of the Sunni insurgent group the Islamic State of Iraq and Syria. June 28, 2014 Members of the all-volunteer Iraq of Imam Hussein Regiment take up positions on a street corner as part of a basic-training course in the Iraqi holy city of Karbala. Shiite men have been ordered by Grand Ayatollah Ali Sistani, the country’s highest Shiite authority, to protect Shiite shrines and help counter the recent gains of the Islamic State of Iraq and Syria, a Sunni insurgent group. Scott Nelson/For The Washington Post Buy Photo Wait 1 second to continue.

“We no longer trust or respect the government and have been searching for an alternative that ensures our basic rights,” said Mohammed Kreishan, one of the marchers. “In the Islamic State, we have found our alternative.”

On Wednesday, anti-government demonstrators gathered at the mosque in central Maan and marched toward the courthouse with gasoline bombs, but they were deterred by the presence of Jordanian riot police in armored personnel carriers.

A symbol of Jordan’s monarchy and central government, the charred and bullet-riddled courthouse has been the scene of near-nightly gunfire in recent weeks. ISIS banners were briefly raised on the mosque’s roof and still fly from flagpoles at traffic circles.

Maan is an impoverished regional center about 150 miles south of Amman, the capital, and a world away from the five-star hotels and Western-style coffee shops of that cosmopolitan city. The official unemployment rate in Maan tops 25 percent and is far higher among its youth. One of the largest employers is a state cement factory.

Maan has been a crucible for anti-government activists for a generation and today is home to leading al-Qaeda clerics, who themselves fear that the younger generation may no longer listen to the Salafist old guard but instead will run off and join newer, more extreme groups such as ISIS.

Like most observers, Jordan’s leaders appeared to be taken by surprise by the lightning-quick advance and string of conquests this month by ISIS fighters and Sunni rebels who reached the environs of Baghdad.

Originating in al-Qaeda, patched together by splinter groups fighting in Syria and Sunni insurgents in Iraq, ISIS seeks to establish a Muslim caliphate based on an especially strict interpretation of Islamic law.

Security analysts estimate that about 2,000 Jordanians are fighting in Syria and Iraq today, at least half of them with ISIS.

Reports earlier this month suggested that ISIS forces had taken the key Jordan-Iraq border crossing at Turaibil, but Jordanian military officials told reporters this week that Sunni tribes control the area, after the Iraqi military left following clashes with ISIS. Border traffic is lighter than normal but flowing, according to eyewitnesses.

Secretary of State John F. Kerry met with Jordan’s foreign minister, Nasser Judeh, in Paris on Thursday to discuss a regional response to the ISIS threat.

“I am worried, but I am not scared” of ISIS’s recent success in Iraq spilling over into Jordan, said Mohammad Farghal, director general of the Center for Strategic Studies at the King Abdullah II Defense Academy and a retired major general in Jordan’s armed forces.

“We are quite confident when it comes to securing the border,” Farghal said. What is worrying, he said, “is that poverty and dissatisfaction create fertile ground for extremist organizations in Jordan. This is our greatest security challenge.”

Mohammed Abu Saleh, a political leader in Maan who helped organize the anti-government rallies, said the populace was being “suffocated” by heavy-handed actions by the security forces. “The only state services we get are riot police,” he said. “The city has been forgotten. There are no jobs, no development, no dignity.”

“For us,” he added, “these are larger issues than unfurling an ISIS banner.”

Abu Saleh said that support for ISIS is born of frustration. “Some people use the threat of ISIS to send a message to the regime,” he said. “We’ve reached the point where the enemy of my enemy is my friend.”

According to Mohammed Shalabi, popularly known as Abu Sayyaf, a leader of Jordan’s al-Qaeda-aligned Salafist movement based in Maan, the allure of ISIS is growing, especially among young men looking to participate in jihad.

“We warned those who are aligned with the Islamic State not to go out and rally or to take any action in Jordan, as it is outside their religiously sanctioned mission and would hand a gift to Jordanian authorities trying to depict us as terrorists,” Abu Sayyaf said. “Unfortunately, these are kids who know very little about their own religion, about jihad, and are not willing to answer or listen to anybody.”

Organizers of the rallies say that, while ISIS has supporters in Maan, it has no formal structure there.

The two rallies drew only about 100 marchers, and it was unclear how many of them were simply shouting against the monarchy. Residents here watched the demonstrations from the sidewalks, displaying more curiosity than support.

ISIS supporters here have not called for military action or direct confrontation with the Jordanian government.

Jordan’s intelligence and security services have in the past allowed jihadist groups and al-Qaeda affiliates to operate within the country’s borders — the better to keep an eye on them and infiltrate their ranks.

Yusuf Mansur, an economic analyst in Amman, said ISIS’s victories in Iraq could increase energy costs in Jordan, which could intensify dissatisfaction with the government. About 10 percent of Jordan’s oil comes from Iraq.

Mansur agreed that cities such as Maan have been neglected and noted that the Jordanian government has the money to spend. “You put $100 million into Maan, and the south will be pacified,” he said.

For now, there are some angry people in Maan. On Monday night, Jordanian police burst into the compound of the large Abu Darwish family, seeking to arrest one of the older sons on outstanding charges of drug possession and assault (for which he had received a pardon from the king, they say).

When the police entered, the men grabbed their own guns, and multiple shots were fired. Eight family members were wounded, some seriously, and one son, Aref Abu Darwish, was killed.

The sons say they loathe the government and are looking for justice — and payback. “The king called for this security crackdown because of what is happening in Iraq,” said Zain Abu Darwish, whose cousin has been organizing locals to back ISIS.

“The government is shedding Jordanian blood,” he said. “They are the ones who are creating this situation.”