WASHINGTON — U.S. President Donald Trump has said NATO is "no longer obsolete," a huge reversal from an oft-stated stance that alarmed U.S. allies, and one in a series of recent foreign policy U-turns.

At a joint press conference with NATO Secretary General Jens Stoltenberg on Wednesday, Trump said that he will continue to work closely with NATO allies, especially when it comes to fighting terrorism.

"The secretary general and I had a productive discussion on what more NATO can do in the fight against terrorism," Trump said. "I complained about that a long time ago and they made a change and now they do fight terrorism."

"I said it was obsolete," he said. "It is no longer obsolete."

The statement comes as Trump reversed course from campaign-trail rhetoric on other foreign policy issues. In a Wall Street Journal interview published Wednesday, Trump reportedly said he would not label China a currency manipulator and that he would fill two vacancies on the Export-Import Bank, which he decried as a candidate.

Last week, the administration flipped from equivocation on regime change in Syria to a U.S. airstrike against the regime's deadly chemical weapons attack and insistence that Syrian President Bashar Assad go. That has, in turn, fueled a row with Moscow that seemed to upend a staunchly held goal for Trump: repaired relations with Russia.

On Wednesday, Trump expressed measured optimism with a touch of saber rattling after Secretary of State Rex Tillerson visited with Russian President Vladimir Putin in Moscow.

"It would be wonderful, as we were discussing just a little while ago, if NATO and our country could get along with Russia," Trump said at the press conference with Stoltenberg. "Right now we are not getting along with Russia at all. We may be at an all-time low in terms of relationship with Russia. This has built for a long period of time, but we are going to see what happens. Putin is the leader of Russia. Russia is a strong country. We are a very, very strong country. We will see how that all works out."

For their part, Russian officials used the administration's foreign policy disorganization to troll Trump on Twitter and deflect U.S. pressure for it to abandon Assad.

Russian Foreign Minister Sergey Lavrov, ahead of a meeting with Tillerson earlier Wednesday, needled him on the Washington's "confusing and sometimes openly contradictory ideas on the entire range of bilateral and international issues."

"It is not clear what they will do in Syria and not only there," Foreign Ministry spokeswoman, Maria Zakharova, said on Russian television, according to the New York Times. "Nobody understands what they will do in the Middle East because it is a very complicated region, forgive me for saying such a banal thing. Nobody understands what they will do with Iran, what they will do with Afghanistan."

Indeed, allies have been struggling to parse the administration's mixed signals. A day earlier, Tillerson confused European diplomats at a meeting in Italy when he said, according to Bloomberg, "Why should U.S. taxpayers be interested in Ukraine?"

The statement came after Tillerson affirmed in a TV interview broadcast Sunday that U.S. and Europe shouldn't lift the sanctions imposed against Russia for its invasion of Ukraine and its annexation of its Crimea region.

One constant that Trump reiterated at Wednesday's press conference was that NATO allies must "meet their financial obligations and pay what they owe."

All NATO countries have agreed to spend 2 percent of their gross domestic product on their own defense by 2024, but only a few of the member countries meet that goal.

Trump said he hoped NATO allies will take a larger role in supporting Iraq and that he is dispatching National Security Adviser H.R. McMaster to Afghanistan to find out how to make progress there with Afghan and NATO allies.

Stoltenberg said NATO is increasing its readiness, and called the ongoing deployment of four battle groups to Eastern Europe a "sufficient" answer to Russia. He said that Trump's strong, clear message on member-nation defense spending has been helpful, as the alliance is on track to increase defense spending by 3.8 percent overall.

"All European allies have reduced defense spending since the end of the Cold War because tensions went down, but if you are decreasing defense spending when tensions are going down, you have to increase when tensions are going up, and now they are going  up," Stoltenberg said.

Though Trump had repeatedly characterized the NATO alliance as "obsolete," a senior White House official said ahead of the Stoltenberg meeting that Trump is "100 percent committed to the alliance," and that Trump has met with leaders of NATO allies U.K., Germany and Denmark.

"I don't anticipate it will be an awkward discussion," the senior White House official told reporters. "I think that the secretary general has made clear that he also views it as a priority to get allies to show they're a greater burden of defense investment."

The Senate's No. 2 Democrat, Sen. Dick Durbin, of Illinois, read Trump's recent foreign policy reversals on Wednesday as an ideological shift. The administration is tacking toward a more centrist worldview, moderated by McMaster and Defense Secretary James Mattis, he said.

The airstrike last week, Durbin said, was "an indication they are moving toward what used to be the center stripe, mainstream on foreign policy."

"What you're seeing is moderation of the views of Donald Trump at least in his White House foreign policy that differ from what we heard on the campaign trail," Durbin said on MSNBC on Thursday. "On the campaign trail he didn't back off an inch."

Email:   jgould@defensenews.com                          

Twitter:   @reporterjoe

Joe Gould was the senior Pentagon reporter for Defense News, covering the intersection of national security policy, politics and the defense industry. He had previously served as Congress reporter.

More In Congress