Washington (CNN) President Donald Trump emphatically embraced NATO Wednesday in a reversal of his campaign trail rhetoric lambasting the organization.

"I said it's obsolete," Trump said, referencing a favorite refrain. "Now it's no longer obsolete." He was speaking to reporters at the White House alongside NATO's secretary general, Jens Stoltenberg, after giving him a warm welcome and praising the organization as "the bulwark of international peace and security."

Trump's newfound enthusiasm for NATO brings him into alignment with a long-standing bipartisan consensus in Washington, exemplified by House Speaker Paul Ryan's announcement earlier Wednesday that he would lead a delegation of both Republicans and Democrats to visit key NATO members.

But Trump's about-face has more to do with those closest to him and the way Stoltenberg has focused on shared priorities with the new President, as well as the deterioration of another key relationship: that of the US and Russia. Here are four factors that have driven Trump's dramatic 180 on NATO -- for now.

Personnel

Trump has appointed several pro-NATO figures to senior positions and appears willing to heed their advice. Secretary of Defense James Mattis once held one of the senior-most military commands in the alliance and Secretary of State Rex Tillerson called the US commitment to the collective defense of fellow alliance members "inviolable" during his confirmation hearings.

Lt. Gen. HR McMaster, Trump's new national security adviser, is similarly thought to embrace the alliance.

And it's fitting that Trump made his comments alongside Stoltenberg following an hour-long meeting in the Oval Office.

Stoltenberg has long professed NATO priorities similar to Trumps, in particular boosting defense spending among the member states and fighting terrorism.

During the presidential race, Trump even went so far as to suggest that America's commitment to the alliance's principle of collective defense of other member states was contingent on whether the country being attacked met its commitment to defense spending. But on Wednesday, a senior White House official called Trump's current commitment to collective defense "ironclad." Nevertheless, Stoltenberg has echoed Trump in calling for increased burden-sharing, labeling it his "top priority."

Counterterrorism

On Wednesday, Trump specifically cited NATO's initiatives in fighting terrorism as reason for his newfound respect for the organization.

"They made a change, and now they do fight terrorism," Trump said, which was a key demand he as a presidential candidate.

JUST WATCHED NATO chief brushes off past Trump criticism Replay More Videos ... MUST WATCH NATO chief brushes off past Trump criticism 02:41

While NATO officials have long stressed that the organization has been combating terrorism for over a decade -- including by fighting and training local troops in Afghanistan -- the alliance has in recent months taken on an even bigger role in counterterrorism.

In February, NATO began training Iraqi troops in country, helping build their capacity for the battle against ISIS. A NATO official told CNN that that effort has "no end date." NATO has also since October flown AWACS surveillance planes in support of the counter-ISIS fight.

"NATO is involved in supporting the fight against terrorism in Syria and Iraq," Stoltenberg told CNN"s Wolf Blitzer following his White House visit. "We are present in the wider Middle East region helping partners like Jordan (and) Tunisia to stabilize their countries and to fight terrorism."

But, he added, "I believe NATO can do more."

Defense Spending

During the presidential campaign, Trump repeatedly slammed the members -- 23 out of 28 -- that are not meeting the alliance's recommended defense spending levels of 2% of GDP.

But there has been progress on that front, too.

NATO announced that the its members had boosted its overall non-US defense spending by 3.8%, or $10 billion, in 2016. Romania, Latvia and Lithuania -- all concerned about the ambitions of nearby Russia -- have all recently announced that they will meet the target next year.

Some experts think that Russia's military activities have been a bigger driver of defense spending increases than Trump's pressure, particularly among the alliance's eastern members.

JUST WATCHED Donald Trump to NATO countries: Pay up Replay More Videos ... MUST WATCH Donald Trump to NATO countries: Pay up 00:39

Stoltenberg, however, expressed gratitude to Trump directly Wednesday for his emphasis on boosting allied defense spending.

"I thank you for your attention to this issue," he said. "We are already seeing the effects of your strong focus on the importance on burden-sharing in the alliance."

But the momentum might not last.

"Although (Stoltenberg) also wants Europe to spend more, he's only the political leader of the alliance," Jorge Benitez, the director of NATOSource told CNN. "He can't deliver on increases the way Trump wants him to."

The leaders of Europe and Canada would need to take the hard political decisions to boost defense spending, he said. "I don't think Europeans are taking this threat seriously enough."

Russia

And then there's the deterioration of Trump's relationship with NATO's traditional adversary, Moscow.

"We may be at an all-time low," Trump said of US-Russia relations Wednesday.

Tensions have recently flared over Moscow's military backing of Syrian President Bashar al-Assad, whom the US accused of using chemical weapons last week. Russia then criticized the US for launching a retaliatory strike.

"(Trump) has been very firm that he is 100% committed to NATO," a senior administration official. "I think that position remains unchanged, and probably was reinforced by, again, everything that Russia is doing,"

The Russians appeared to mock Trump's new stance on the alliance, with Moscow's diplomatic mission to NATO issuing a tweet questioning when the alliance no longer became obsolete.

On Monday, Trump signed off on the Balkan country of Montenegro becoming NATO's newest member, a move that Moscow has long opposed.

"For Russia, this is something they did not want to see happen," NATO Supreme Allied Commander Europe, Gen. Curtis Scaparrotti, told the House Armed Services Committee last month.

On Thursday, a US-led battalion in Poland bolstering Eastern European allies in Russia's shadow, is due to be activated.