Updated

President Obama announced Monday that Iraqi and Kurdish security forces, backed by U.S. airstrikes, have recaptured the vital Mosul Dam -- calling it a "major step forward" in the fight against Islamic State militants who seized the dam earlier this month.

"If that dam was breached, it could have proven catastrophic," Obama said, speaking from the White House briefing room.

The joint military campaign lasted for hours, as U.S. airstrikes pounded Islamic militant positions while Iraqi security forces and Kurdish Peshmerga fighters battled on the ground to retake the infrastructure. Obama, who spoke during a brief pause in D.C. from his vacation in Martha's Vineyard, said thousands of civilians as well as the U.S. embassy compound in Baghdad could have been endangered if the dam broke.

He vowed to continue a "long-term strategy" to turn the tide against Islamic State (also known as ISIS, or ISIL) militants, while continuing to urge the incoming Iraqi government in Baghdad to form an "inclusive" system.

"ISIL poses a threat to all Iraqis and the entire region," Obama said. He reiterated that Iraq will "have to ultimately provide for its national security" but said the U.S. has a security interest in stopping a "savage group" from spreading.

The U.S. military provided heavy assistance during the operation to retake the dam.

Pentagon Press Secretary Rear Adm. John Kirby said Monday night, "Over the past 72 hours, at the request of the Iraqi government, the U.S. military used fighters, bombers, attack, and unmanned aircraft to conduct 35 strikes that eliminated ISIL positions in and around the Mosul Dam complex. In all, we destroyed over 90 targets including a range of vehicles, equipment, and fighting positions."

Obama's comments came after both sides gave conflicting claims regarding who had control of the dam. After local forces claimed they had seized it, the Islamic State, which two weeks ago captured the Mosul Dam spanning the Tigris River just north of the city of Mosul, denied those claims.

The retaking of the dam, though, marks the first major victory for the Iraqi and Kurdish forces battling the Islamic militants since U.S. airstrikes began earlier this month.

It could significantly boost their morale as they try to free territory overrun by the Islamic State in a blitz this summer. Also, the dam and its broader complex hold great strategic value as they supply electricity and water to a large part of the country.

The dam's seizure by Islamic State militants on Aug. 7 was part of a string of victories by the Sunni radical group as it looks to expand its hold in northern Iraq, driving back Kurdish forces, sending minority communities fleeing and unleashing a wave of violence over a territory straddling the Syria-Iraq border.

Alarmed by the militants' advance, the U.S. and Iraqi airstrikes pounded the area over the past two days. U.S. officials told Fox News that American forces conducted nine strikes on Saturday and another 14 on Sunday in efforts to help the Iraqis retake the dam.

However, the Sunni militants remain in control of vast swaths of northern and western Iraq, including the city of Mosul, as well as much of northeastern Syria.

Some 1.5 million people have been displaced by fighting in Iraq since the Islamic State's rapid advance began in June. The scale of the humanitarian crisis prompted the U.N. to declare its highest level of emergency lasts week.

The decision to launch airstrikes marked the first direct U.S. military intervention in Iraq since the last American troops withdrew in 2011 and reflected growing international concern about the extremist group.

The White House sent a letter to Congress on Sunday saying that its air campaign in Iraq "is consistent with the president's directive that the U.S. military protect U.S. personnel and facilities in Iraq, since the failure of the Mosul Dam could threaten the lives of large numbers of civilians and threaten U.S. personnel and facilities -- including the U.S. Embassy in Baghdad."

Fox News' Jennifer Griffin and Greg Palkot and The Associated Press contributed to this report.