WASHINGTON - US Defence Secretary Jim Mattis said Tuesday that President Donald Trump should consider sticking with the nuclear accord with Iran, which he said is in the US national interest.

Mattis’s expression of support for the 2015 agreement curbing Iran’s nuclear program was in sharp contrast with Trump’s blunt assessment that the deal is an “embarrassment to the United States.”

“If we can confirm that Iran is living by the agreement, if we can determine that this is in our best interest, then surely we should stay with it,” told the Senate Armed Services Committee. “I believe at this point in time, absent indication to the contrary, it is something that the president should consider staying with,” he said. Asked whether he believed the Iran deal was in the national interest, Mattis replied: “Yes, senator, I do.”

Trump must notify Congress every 90 days whether he believes that Iran is abiding by the accord and whether lifting of sanctions against Tehran, as provided for under the agreement, remains in the US national interest.

He has so far certified that Iran is in compliance but has indicated that the next deadline on October 15 will be crucial.

Meanwhile, Jim Mattis said his department “supports fully” Secretary of State Rex Tillerson’s effort to find a diplomatic solution to the North Korea nuclear stand-off.

Defence Secretary Mattis was speaking two days after President Donald Trump appeared to undermine his top diplomat by saying he was “wasting his time” by talking to Kim Jong-Un’s regime.

State Department officials insist Trump was not criticizing Tillerson, but pressuring Kim Jong-Un’s regime to agree to discuss its disarmament while a diplomatic option remains on the table.

Mattis, in testimony to the House Armed Services Committee, said the Pentagon stands four square behind the strategy - and singled out Tillerson for support. “The international community... is focused on the destabilizing threat posed by North Korea and Kim Jong-Un’s relentless pursuit of nuclear and ballistic missile capabilities,” he said.

“The Defence Department supports fully Secretary Tillerson’s efforts to find a diplomatic solution but remains focused on Defence of the United States and our allies.”

Tillerson has explained the strategy as one of using United Nations and US sanctions and diplomatic pressure to convince Kim of his isolation and force him to negotiate nuclear disarmament.

US officials insist publicly that they have military options to counter the threat from Pyongyang if this fails, but admit privately that they are risky. So it was hard to square Tillerson’s diplomatic push with the Trump tweets that greeted him Sunday as he flew back from meeting Chinese leader in Beijing.

“I told Rex Tillerson, our wonderful Secretary of State, that he is wasting his time trying to negotiate with Little Rocket Man,” Trump wrote, using his dismissive nickname for Kim.

“Save your energy Rex, we’ll do what has to be done!” he added, apparently suggesting that some kind of non-diplomatic option was back on the table.

“Being nice to Rocket Man hasn’t worked in 25 years, why would it work now? Clinton failed, Bush failed, and Obama failed. I won’t fail.”

Kim is 33 years old and came to office in 2011, but Trump appears to have been referring to previous US efforts to deal with his father and grandfather.

While in China, Tillerson had told reporters that he was “probing” whether the North is ready for talks on the denuclearization of the Korean peninsula. “So stay tuned,” he added.

“We have lines of communications to Pyongyang. We’re not in a dark situation, a blackout. We have a couple, three channels open to Pyongyang. We can talk to them. We do talk to them.”

This revelation appears to have triggered Trump’s tweeted response - which in turn sparked fresh rumors of tensions between the president and his top diplomat.