Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

VIENNA — Iran and world powers capped a decade-long dispute by reaching a historic deal early Tuesday for Tehran to curb its nuclear program in exchange for the easing of economic sanctions.

The Islamic republic has been negotiating with the U.S., Britain, France, Germany, Russia and China for years, with diplomats most recently extending numerous deadlines in hopes of arriving at a workable and comprehensive plan.

President Barack Obama said the deal with Tehran ensures that "every pathway to a nuclear weapon" has been cut off.

"We have stopped the spread of nuclear weapons in this region," he said in an early-morning statement that — in a rare move — was carried on Iranian television.

His remarks appeared aimed at reassuring close U.S. allies like Israel and Saudi Arabia, who have vehemently opposed a deal and insisted Iran cannot be trusted with a nuclear program of any kind.

Obama said that if Iran violates the terms of the agreement, sanctions will be snapped back into place.

The deal is "not built on trust," he said. "It is built on verification."

The president spoke after Iranian Foreign Minister Javad Zarif called the agreement a "historic moment" and a "win-win solution" with the potential to usher in a "new chapter of hope" in relations.

"We are reaching an agreement that is not perfect for anybody, but it is what we could accomplish, and it is an important achievement for all of us," he said early Tuesday. "Today could have been the end of hope on this issue, but now we are starting a new chapter of hope."

Both Obama and Secretary of State John Kerry billed the agreement as critical to averting broader conflict, with Kerry telling NBC News that "Israel is safer" as a result — but Israeli officials insisted it would have the opposite effect.

Prime Minister Benjamin Netanyahu said the deal gave Iran a "sure path to nuclear weapons," while Science Minister Danny Danon called the accord "dangerous for the entire free world."

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

However, the EU's chief negotiator said the terms were "balanced" and respected the interests of "all sides."

"It's not only a deal," Federica Mogherini said at a news conference formally announcing the accord. "It's a good deal."

The comprehensive agreement — which runs more than 80 pages — was clinched after marathon overnight negotiations in Vienna.

Related: Why Iran's Supreme Leader Negotiated With 'Great Satan'

It involves limiting Iran's nuclear production for 10 years and Tehran's access to nuclear fuel and equipment for 15 years in return for hundreds of millions of dollars in sanctions relief. However, the sanctions would not be lifted until Iran proves to the International Atomic Energy Agency that it has met its obligations under the deal.

The agreement includes the provision of a "snap back" mechanism that could lead to the reinstatement of sanctions within 65 days if Iran violates the deal, according to officials.

The head of the IAEA confirmed that Iran also has signed a road map with his organization to clarify outstanding issues.

"This is a significant step forward," Yukiya Amano told reporters.

A senior White House official cautioned that while the agreement was undoubtedly historic, it was not an "immediately transformative" moment.

"We're years away from judging its success," the official told NBC News.

U.N. Secretary General Ban Ki-moon, though, said the agreement was a testament to "the value of dialogue."

"I hope — and indeed believe — that this agreement will lead to greater mutual understanding and cooperation on the many serious security challenges in the Middle East," he said in a statement. "As such it could serve as a vital contribution to peace and stability both in the region and beyond."

Ministers from the P5+1, the EU, and Iran this morning at the #IranTalksVienna. Final plenary about to start. pic.twitter.com/dkIC2vrR5n -Marie Harf (@marieharf) July 14, 2015

The deal still faces a vote in Congress, although it is unclear whether Republicans and some Democrats who object to it will actually be able to override the decision — and Obama threatened Tuesday to veto any attempt to reject the accord.

Washington was already abuzz even before Obama spoke, with Republican Sen. Ben Sasse of Nebraska saying the administration had "just lit the fuse for a nuclear arms race in the Middle East."

"We all know Iran's neighbors will not sit idly as the world's largest state-sponsor of terror becomes a nuclear-threshold state," Sasse said in a statement.

Related: What Happens Next After Iran Nuclear Deal?

Democratic Sen. Ben Cardin of Maryland, ranking member of the Foreign Relations Committee, said Congress has an "obligation to vigorously and judiciously review the deal."

"It is in America's national security interest that Iran is blocked from ever having a nuclear weapon," he said in a statement. "Negotiators have spent painstaking time and untold effort working on this accord. Congress in turn must fulfill its oversight responsibilities."

Iran's moderate president, Hassan Rouhani, has staked a large share of his political future on a successful outcome of talks. He stands to be one of the biggest winners out of the agreement.

Just now, Iran and @iaeaorg agree to accelerate cooperation with aim to fully resolve all prior issues. #IranTalks pic.twitter.com/MjtKsfCvsO — Hassan Rouhani (@HassanRouhani) July 14, 2015

Rouhani welcomed the "happy day" Tuesday and said "chains are breaking" around Iran's people.

"Iran has never been looking into building nuclear bombs whether or not there is an agreement or not," he said.