The nuclear deal is the latest international agreement that Mr. Trump has tried to exit, amend or water down, including the Paris climate accord and the Trans-Pacific Partnership. The closest analogy to this deal may be Nafta, the trade agreement that Mr. Trump once threatened to rip up and is now undergoing a painstaking renegotiation.

Critics said Mr. Trump risked isolating the United States diplomatically and giving up the deal’s hard-won gains, including intrusive inspections of Iran’s nuclear facilities. The angriest voice belonged to former Secretary of State John Kerry, who spent several years negotiating the accord that Mr. Trump denounced.

“It is very, very poor, nonstrategic diplomacy,” Mr. Kerry said in an interview, his voice rising. Pointing out that “you cannot unilaterally reset the terms of the deal,” he said the agreement “gives us a quarter-century of absolute accountability” and assured that “the minute we see the stockpile going up, the questions and red flags will go up like crazy. And 15 or 25 years from now, we still have the same military options we have today.”

“If you want to have your war, Donald Trump,” Mr. Kerry said, “you can have it in 20 years.”

Congress is deeply divided on the Iran deal, and getting it to agree on additional legislation could prove difficult. While some Republicans are eager to undermine the deal, Democrats are equally determined to preserve what they view as another legacy of the Obama administration that Mr. Trump is trying to dismantle.

“We will not buy into the false premise that it is Congress’s role to legislate solutions to problems of his own making,” said Senator Benjamin L. Cardin of Maryland, the top Democrat on the Foreign Relations Committee.

Senator Bob Corker of Tennessee, the chairman of the committee, released a potential blueprint for imposing an automatic return of sanctions if Iran was believed to be capable of producing a nuclear weapon within a year, or if it violated other restrictions.

He worked on the proposal with White House officials and Senator Tom Cotton, the Arkansas Republican who is a hard-liner on Iran, and predicted it could win bipartisan support. It suggests that Mr. Corker’s bitter personal feud with Mr. Trump will not obstruct cooperation on this issue.