WASHINGTON — President Obama hailed the recapture of Mosul dam Monday as a “major step forward” as a barrage of U.S. airstrikes helped Kurdish and Iraqi forces score the biggest victory of its counteroffensive against the Islamic State militants.

Obama also urged the badly fractured and largely dysfunctional Iraqi government to move quickly to forge a united front and give hope to Sunni tribes who’ve been marginalized. Obama noted last week’s decision by Nouri al-Maliki to step down as Iraq’s prime minister, a move that raised hopes a new government could roll back Iraq’s powerful Sunni insurgency and prevent the country from splitting apart.

“They’ve got to get this done because the wolf’s at the door,” the president said.

Speaking from the White House briefing room, Obama said he was pleased the United States had given Iraqi security forces and the Kurdish militia an important boost in Mosul. But he stressed the importance of political progress and said it is imperative that Iraq become a viable partner for the U.S.

The U.S. will continue to assist Iraqi security forces with a limited military campaign designed to protect American personnel and facilities and to alleviate humanitarian crises created by Islamic State militants, he said.

He added that it is not for the U.S. to be a surrogate air force for Baghdad and it is up to Iraqis to create a sustainable peace.

“We’ve got a national security interest in making sure our people are protected and in making sure that a savage group that seems willing to slaughter people for no rhyme or reason other than they have not kowtowed — that a group like that is contained because ultimately it can pose a threat to us,” Obama told reporters.

The Islamic extremists captured the Mosul dam on Aug. 7. Obama said if the dam on the Tigris River had been breached it could have had catastrophic consequences and endangered American Embassy personnel in Baghdad.

A Pentagon spokesman, Navy Rear Adm. John Kirby, said the U.S. had conducted 35 airstrikes in the area of the Mosul dam since Saturday.

“In all, we destroyed over 90 targets including a range of vehicles, equipment, and fighting positions. Iraqi forces have cleared the dam and are working to further expand their area of control,” Kirby said.

The president gave no indication of how long the U.S. military will remain engaged in Iraq. Washington is urgently providing arms and assistance to Iraqi security forces as well as Kurdish fighters as they seek to reverse Islamic State gains, he said. Obama has said he will not send U.S. ground forces to fight in Iraq.

U.S. Central Command said American fighters, bombers and drone aircraft conducted 15 strikes Monday around the dam, hitting Islamic State fighting positions as well as an anti-aircraft artillery gun and other weaponry of the group that has captured wide swaths northern and western Iraq this summer.

The White House notified Congress by letter Sunday that U.S. warplanes were engaged in strikes aimed at helping Iraq regain control of the dam.

The letter said “failure of the Mosul dam could threaten the lives of large numbers of civilians, threaten U.S. personnel and facilities — including the U.S. Embassy in Baghdad — and prevent the Iraqi government from providing crucial services to the Iraqi populace.”

A Pentagon spokesman, Army Col. Steve Warren, said Monday the U.S. had no indication of the dam’s imminent failure but is determined to prevent that possibility, which would pose a humanitarian disaster for people along the Tigris river.

Before Obama spoke, Kurdish forces said they regained full control of the dam and its surrounding facilities following two days of fierce clashes. But Iraq’s Defense Ministry said security forces only “liberated a large part” of the dam and not the entire complex.

The 15 U.S. airstrikes on Monday were in addition to 16 on Sunday and nine on Saturday. The Pentagon refused to identify the specific types of aircraft used in the airstrikes around the Mosul dam, citing restrictions imposed by countries in the Middle East that are allowing the U.S. to use their air bases.