 -- Twelve days before the Trump administration will decide whether or not to re-certify Iran's compliance with the Iran deal, Secretary of Defense James Mattis told Congress it's in America's national security interest to keep the agreement.

Testifying before the Senate Armed Services Committee on Tuesday, Mattis replied in the affirmative to a question about whether it was in the U.S. national security interest to stay in the Joint Comprehensive Plan of Action (JCPOA) -- better known as the Iran deal -- an international agreement which restricts Iran's enrichment of uranium and its stockpiles.

"If we can confirm that Iran is living by the agreement, if we can determine that this is in our best interest, then clearly, we should stay with it," Mattis said. "I believe, at this point in time, absent indications to the contrary, it is something the president should consider staying with."

President Trump, who has repeatedly called the agreement one of the "worst deals" for the U.S., last re-certified Iran's compliance in July. The next deadline for certification is Oct. 15.

If Trump de-certifies Iran's compliance, Congress must decide within 60 days whether or not to reimpose nuclear sanctions against Iran. This would constitute a material breach and essentially destroy the agreement.

"The Iran deal was one of the worst and most one-sided transactions the United States has ever entered into frankly that deal is an embarrassment to the United States, and I don't think you've heard the last of it," Trump said during an address before the United Nations General Assembly in September.

Testifying beside Mattis on Tuesday, the top U.S. general said Iran is in compliance with the deal.

"Iran is not in material breach of the agreement, and I do believe the agreement to date has delayed the development of a nuclear capability by Iran," Gen. Joseph Dunford, chairman of the Joint Chiefs of Staff, said.

In his reconfirmation hearing before the same committee last week, Dunford warned that "holding up agreements that we have signed, unless there's a material breach, would have an impact on others' willingness to sign agreements."

Given the country's compliance with the agreement, Dunford urged the U.S. to focus on other challenges with Iran, namely missile, maritime and cyberthreats, as well as their support for terrorist organizations.