House Minority Leader Nancy Pelosi, D-Calif., called President Trump's Friday threat to withdraw from the Iran nuclear agreement a "grave mistake" that threatens American security, and argued that the Iranians are in compliance with the 2015 agreement.

Pelosi called the decision "frivolous" and added that Trump reportedly made the threat despite arguments made by Secretary of Defense Jim Mattis and Secretary of State Rex Tillerson in favor of keeping the U.S. in the deal.

"I say the Iran nuclear agreement was the best way to prevent Iran from becoming a nuclear armed state," Pelosi said during a press conference Friday. "President Trump's refusal to recertify is a grave mistake that threatens America's security and our credibility at a very critical time."

"The president, I think, is being frivolous with this," Pelosi said.

Pelosi argued that the president's threat to pull out of the agreement only isolates the U.S. on the world stage, not the Iranians, and said a State Department official who briefed her on the decision told her that Iran was not in violation of the agreement.

The highest ranking House Democrat said the move is "particularly dangerous" given the ongoing situation with North Korea as it continues its push for full nuclear weapons capability.

"What are we doing here?" Pelosi asked later of Trump's announcement that the U.S. could withdraw from the deal unless much tougher sanctions are imposed against Iran.