President-elect Trump's nominee to head the Pentagon Thursday seemed to part ways with his soon-to-be boss over what do about a nuclear agreement with Iran that both agree is flawed.

At one point during the campaign, Trump vowed to rip the deal up on day one, but retired Gen. James Mattis, testifying at his Senate confirmation hearing, suggested the accord should be strictly enforced, instead of discarded.

"I think it is an imperfect arms control agreement. It's not a friendship treaty," Mattis said. But he repeated a view he held in April when he gave a speech in Washington, that it was too late to back out.

"When America gives her word, we have to live up to it and work with our allies," Mattis said.

That answer didn't sit well with Sen. Lindsey Graham, R-S.C., who advocates taking a tougher line with Iran.

"I think President-elect Trump gave his word to the American people, 'I'm gonna change this bill because it's terrible,' Graham said in sharp questioning of Mattis. "Do you expect him to keep his word?"

Mattis said dealing with Iran now required an "integrated strategy," which he said would be developed by Trump's national security team once the members were confirmed and on the job.

Mattis said while the agreement, negotiated by the United States and six world powers, was "not a deal he would have signed," the emphasis now needs to be on making sure Iran doesn't cheat.

"I would ask the Congress to have a joint committee from banking, armed services and intel to oversee the implementation of the deal," Mattis testified, "and should there be any cheating, then the Congress would be kept informed."

Mattis says the U.S. needs to ensure its intelligence services are "fully staffed" to monitor Iranian activities, along with deploying enhanced missile defenses in conjunction with America's Persian Gulf allies.

"Every time we catch Iran up to some kind of terrorist activity, we would take that to the United Nations and display it for the world to see," Mattis said.

Under questioning, Mattis agreed that Iran is a destabilizing force in the Middle East, and that its seizure of U.S. sailors in the Gulf this time last year was an affront to America.