WASHINGTON — Democrats panned President Donald Trump’s announcement Tuesday that the U.S. would withdraw from the Iranian nuclear deal, warning of another nuclear crisis and even greater tensions in the Middle East, while congressional Republicans generally — though not universally — applauded his decision to walk away from the agreement.

House Minority Leader Nancy Pelosi, D-Calif., said in a statement that Trump's decision would cost the U.S. "its international credibility and the power of our voice at the table."

“The president’s decision to abdicate American leadership during a critical moment in our effort to advance a denuclearization agreement with North Korea is particularly senseless, disturbing and dangerous," Pelosi said.

Her party's 2016 vice presidential nominee, Sen. Tim Kaine of Virginia, said that the president’s actions would create a “new global nuclear crisis” as the U.S. seeks to address one with North Korea.

The move failed to draw praise from Democratic opponents of the original deal like Sen. Robert Menendez of New Jersey, the top Democrat on the Senate Foreign Relations Committee, who said it was a “grave mistake” for the U.S. to walk away from the agreement “without a plan for ensuring that Iran does not restart its nuclear weapon program, without a strategy for countering Iran’s dangerous non-nuclear activities, and without our allies and partners.”

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

And some Democrats said Trump's move was merely part of a campaign to erase former President Barack Obama’s legacy.

“The president's willingness to shatter the international consensus, forged over years of arduous negotiations, on how to constrain Iran's nuclear program only makes sense as part of a campaign to erase his predecessor's legacy, regardless of the consequences to our national security,” said Rep. Adam Schiff of California, the ranking Democrat on the House Intelligence Committee.

A flurry of GOP lawmakers who released statements shortly after the president spoke described the agreement as fundamentally "flawed," including House Armed Services Committee Chairman Mac Thornberry, R-Texas.

Thornberry said Tuesday that the even though he would have preferred "to give our European allies a few more months to strengthen the deal," U.S. priorities should now turn to boosting military and diplomatic efforts: "A strong, international effort is required to curtail Iran’s aggressive behavior in a number of areas.”

Speaker Paul Ryan, R-Wis., said in a statement that the president’s comments had sent “a strong statement that we can and must do better," but suggested that he, too, would have preferred modifying the agreement.

“I have always believed the best course of action is to fix the deficiencies in the agreement,” Ryan said. “It is unfortunate that we could not reach an understanding with our European partners on a way to do that, but I am grateful to them for working with the United States toward that goal. The president is right to insist that we hold Iran accountable both today and for the long term.”

Some Republicans said the move would pave the way for a better deal. Senate Majority Leader Mitch McConnell of Kentucky said that the administration's European partners "now have an opportunity to come back to the table with Secretary Pompeo and negotiate the best terms to create either a better agreement, or a maximum pressure campaign against Iran," while Senate Foreign Relations Committee Chairman Bob Corker, R-Tenn., said that "based on conversations I have had in recent days, it is my sense that the administration will move quickly to work toward a better deal."

Other Republicans said the withdrawal was a misstep.

"Without proof that Iran is in violation of the agreement, it is a mistake to fully withdraw from this deal," Rep. Mike Turner of Ohio, a senior member of the House Armed Services Committee, said. "Now, we need to work with our allies to fix this flawed agreement to ensure the world is not facing a nuclear Iran.”

Sen. Jeff Flake, R-Ariz., was critical of the deal but tweeted that "withdrawing now does not serve our national interest."

"Iran has already realized the benefits of sanctions relief and the release of frozen assets," he said. "Now they are let off the hook when it comes to honoring their nuclear obligations under the agreement."