Special forces teams and army tanks surrounded the Green Zone housing Iraq’s government as Prime Minister Nouri al-Maliki fiercely clung to power Sunday, taking the stability of the country to the brink at a moment when it is already facing a lethal challenge from radical Islamist fighters.

In actions that had all the markings of a political coup, Maliki gave a defiant late-night speech in Baghdad saying he would lodge a legal case against the country’s president, who has resisted naming him as the candidate for another term as prime minister.

Tanks rumbled onto major bridges and roads in the capital as security forces were put on high alert, with militiamen also patrolling Shiite neighborhoods. The special forces teams surrounding the Green Zone were taking orders directly from the prime minister, security officials said.

Maliki’s critics blame him for overseeing the de facto fragmentation of the country, with extremists from the Sunni-dominated Islamic State marauding through territory in the north and west and threatening Baghdad. They say Maliki, a Shiite, has persecuted and alienated members of the Sunni minority, driving them into the arms of radical groups.

The United States began airstrikes in northern Iraq on Friday as the al-Qaeda-inspired Islamic State threatened previously stable Kurdish territory, sending thousands of minority Christians and Yazidis fleeing for their lives.

But President Obama has established limited goals in the air operation, linking further assistance to the formation of a new government in Baghdad that is more inclusive of the country’s Sunnis.

The U.S. government indicated Sunday evening that it had broken with Maliki. State Department spokeswoman Jen Psaki said in a statement that “the United States fully supports President Fuad Masum in his role as guarantor of the Iraqi Constitution. We reaffirm our support for a process to select a Prime Minister who can represent the aspirations of the Iraqi people by building a national consensus and governing in an inclusive manner. We reject any effort to achieve outcomes through coercion or manipulation of the constitutional or judicial process.”

The latest crisis came on a day when Kurdish forces expelled Islamic State extremists from two northern Iraqi towns, in the first signs of a turnaround for the embattled Kurds after a week of stunning losses to the militants. Their success came in the wake of U.S. airstrikes on the towns.

But the political standoff raised the prospect of deeper turmoil and potentially new violence in Iraq, where Shiite militias that had battled U.S. troops during the war have reestablished themselves in recent months.

Maliki’s political rivals, the country’s religious authorities and even parts of his political bloc have tried unsuccessfully to persuade him to step aside. But over his eight years in office, the prime minister has consolidated enormous power in his hands. He is commander in chief of the armed forces, and he holds the Defense and Interior ministry portfolios.

The prime minister’s political bloc won the largest share of seats in April’s parliamentary elections, but not a majority. In his speech, he charged that Iraq’s president, Fouad Massoum, had violated the constitution by not asking Maliki’s political bloc to put forward its candidate before a deadline last week.

“This act represented a coup against the constitution and the constitutional process,” Maliki said. Violation of the constitution could have serious and dangerous consequences, he said, taking the political process into a “dark tunnel.”

Kurdish forces expel Islamic State from two towns.

Special forces also surrounded the presidential palace Sunday, in what appeared to be an act of intimidation.

A boost for the Kurds

Maliki’s surprise move came at the end of a day that had offered some hope for parts of the country besieged by Islamic State warriors.

For the third day, U.S. jets and drones swooped over the militants, launching five strikes near Irbil, the Kurdish capital, that damaged and destroyed the group’s vehicles and a mortar position, according to the U.S. military.

The airstrikes have given a morale boost to beleaguered Kurdish forces in the semi-autonomous north. They have been battling Islamic State militants for two months with outdated weapons, limited ammunition and no salaries. The Kurds’ losses in recent days have included the strategically important Mosul Dam and ancient settlements inhabited by Christians and other minorities.

Still, the region’s president, Massoud Barzani, warned Sunday that the militants’ firepower and determination should not be underestimated.

“We are not only fighting a terrorist group, we are fighting a terrorist state,” he said. “We would never ask our friends to send their sons to fight on our behalf; this is our war. What we are asking our friends to do is to provide support and to cooperate with us in providing the necessary weapons.”

The U.S. government relocated a “limited number” of staff members from its consulate in Irbil to the southern Iraqi city of Basra and to the Jordanian capital, Amman, the State Department said Sunday.

The move underscored the deterioration in the security situation in Irbil since two months ago, when the United States relocated staffers from its embassy in Baghdad to the north.

The Obama administration has said the airstrikes have a limited mission: to protect U.S. military and diplomatic personnel in Irbil, to prevent the massacre of religious minorities, and to safeguard critical infrastructure. On Sunday, thousands of Yazidis, members of a tiny religious sect, fled a barren mountain where they had been trapped for a week, surrounded by the extremist fighters. Some Yazidis said the American airstrikes had helped their escape.

The Kurds’ reconquest of the two northern towns, Makhmour and Gweir, about 30 miles southwest of Irbil, came two days after the towns were targeted by American airstrikes.

Rudaw, a Kurdish television channel, showed live footage Sunday of security forces advancing in Makhmour, where the Kurds had exchanged fire with the extremists a day earlier. The Kurdish forces, known as pesh merga, crowded around a government building in the town, where the region’s flag was raised once more.

The oil-rich district of Makhmour was a valuable target for the militants, who have been pressing to seize resources to fund their self-proclaimed Islamist state.

“It’s thanks to the [American] strikes that we have been able to move forward,” said Mahmood Haji, an official in the Kurdish Interior Ministry. The Kurdish advances help shore up the first lines of defense for Irbil, he said.

Help for stranded sect

An international effort to aid the Yazidis stranded on Mount Sinjar in the country’s northwest picked up steam Sunday. French Foreign Minister Laurent Fabius visited Baghdad and Irbil to oversee the delivery of aid. Britain’s air force dropped tents and water filters overnight Saturday, joining the United States in parachuting in supplies.

The U.S. military conducted a fourth airdrop of food and water for thousands of Iraqis on Sunday night, U.S. Central Command said in a news release.

Followers of a secretive sect with roots in Zoroastrianism, the minority is particularly vulnerable to the Sunni extremists, who have forced Yazidis to convert or have executed them.

Thousands fled Sinjar when the Islamic State swept into the town a week ago, and many have had little food or water since then.

Also Sunday, several prominent Republican lawmakers called for an escalation in U.S. involvement in Iraq.

“We need to go on offense,” Sen. Lindsey O. Graham (R-S.C.) said on “Fox News Sunday.” “There is no force within the Mideast that can neutralize or contain or destroy ISIS without at least American air power.” The Islamic State was formerly called the Islamic State of Iraq and Syria, or ISIS.

But Maliki’s latest moves made it seem unlikely that the Obama administration would change course anytime soon.

Maliki has made enemies across the political spectrum — even Iraq’s Shiite leaders have turned against him. The country’s top Shiite cleric, Grand Ayatollah Ali Sistani, has also repeatedly called for a new, inclusive government, hinting that politicians should not “cling to their positions.”

“Sistani is deeply concerned about the situation,” said Sheik Haider al Taie, one of the cleric’s representatives.

Iran’s ayatollahs came out in public support of Sistani, a sign that Iranian support for Maliki has also slipped away. As the odds began to stack against the prime minister, his party indicated that it was prepared to cut him loose last month.

“There are self-serving people who are trying to get rid of him,” said Kadhim al-Sayadi, a parliamentarian close to the president. He said security forces had been called out to prevent people from “taking advantage” of the situation.

Mustafa Salim in Baghdad; Liz Sly in Fishkhabour, Iraq; Anne Gearan in Sydney; and Hunter Schwarz in Washington contributed to this report.