WASHINGTON -- U.S. President Barack Obama says Donald Trump has indicated strong backing for NATO, despite statements to the contrary made by the Republican during his successful election campaign.

Obama said on November 14 that he and Trump had a useful and "free-flowing conversation" when the two met last week, two days after Trump's stunning victory over Hillary Clinton.

Speaking to reporters ahead of his final foreign trip as president, Obama was asked what he will tell foreign leaders about Trump's faith in the NATO military alliance.

Obama replied, "There is no weakening of resolve when it comes to America's commitment to maintaining a strong and robust NATO relationship."

During the election campaign, Trump suggested that NATO members need to invest more into the alliance. He also suggested that the United States might not come to the defense of NATO members if they didn't increase their military spending.

Obama said that during their meeting Trump "expressed a great interest in maintaining our core strategic relationships." He said that included "strong and robust NATO" partnerships.

Obama's remarks contrast with those he made during the final weeks of the election campaign, when he derided Trump as a man unfit to handle the codes that U.S. presidents use to authorize nuclear missile attacks.

The outgoing president was also asked about past criticism by Trump and some Republicans in Congress that the landmark deal that curbed Iran's nuclear ambitions should be torn up. Iran's president, and other officials, have voiced repeated concern in the days since Trump's election that the agreement might be rejected.

Obama said the deal was successful and continued to curtail Tehran's ability to build nuclear weapons.

"It becomes more difficult to undo something that’s working, then undo something that isn’t working," Obama said. "When you’re not responsible for [the agreement], you can call it a terrible deal. But when you are responsible for it...you are more likely to look at the facts."

Obama will travel to Germany, Greece, and Peru during his final trip as president.