President Trump returned from his third journey abroad this week buoyed by the success of a two-day tour in Paris that was designed to feature his newly forged bond with French President Emmanuel Macron.

The bonhomie of Trump's meetings in France came as a surprise to some observers given that the president had offered veiled support for Marine Le Pen, Macron's election opponent, and that former President Barack Obama endorsed Macron shortly before he won election in May by highlighting Macron's embrace of "liberal values."

Trump had repeatedly characterized Paris as a terrorists' paradise when he was himself a presidential candidate, stoking concerns that the two leaders' divergent worldviews would prevent them from connecting.

But Charles Kupchan, a senior fellow at the Council on Foreign Relations, said Trump and Macron are less incompatible than they may appear at first glance. Kupchan noted Macron, while a "political centrist," is also viewed as a "maverick" with anti-establishment leanings and, like Trump, had no experience running for office before he won the presidency in France earlier this year.

Their similarities could provide the foundation for a relationship that ultimately allows Trump to have a primary point of contact in Europe other than German Chancellor Angela Merkel, who has openly criticized Trump for withdrawing from the Paris climate accords.

Spencer Phipps Boyer, senior fellow at the Brookings Institution and a former Obama administration official, said Macron has labored to build a "rapport" with Trump "that hasn't yet developed with President Trump and Chancellor Merkel."

"President Macron obviously went out of his way to make sure he didn't say anything to antagonize President Trump," Boyer said of Trump's trip to France this week. "I think this contrasts with Chancellor Merkel. Obviously, both Macron and Merkel have been very clear on their differences with the United States."

Indeed, Macron and Trump glossed over potential points of contention during a joint appearance in Paris on Thursday, when journalists pressed them on climate change and Trump's past comments about Paris. Both leaders sidestepped what could have been an opportunity to bash the other in order to focus on areas where their governments agree, such as military cooperation in the fight against the Islamic State.

Boyer said Macron likely scored a political victory at home by hosting the American president this week and flaunting their friendship for the world to see.

"Critics who point to his youth and relative inexperience in politics, this was a way for him to, I think, show that he could be looked at as an important leader in Europe in terms of his relationship with the United States," Boyer said.

Trump, too, had a political incentive to accept Macron's invitation to spend Bastille Day in Paris as his guest of honor, Boyer noted.

"I think Trump jumped at the opportunity because his previous trips to Europe have gone so poorly and the narrative of those meetings was that the world has kind of a very negative impression of this administration, that President Trump is deeply unpopular in Europe, and that trans-Atlantic relations are in a bad place," Boyer said.

He pointed to Trump's journey to a NATO meeting and the G-7 summit in May, during which he declined to endorse NATO's collective defense commitment, clashed with other leaders on trade and withheld support for the Paris accords, from which he later withdrew.

Some European leaders bristled at Trump's "America First" rhetoric and his blunt criticism of NATO allies who have failed to meet their defense spending commitments. Although Trump's aversion to the globalist policies of his predecessor were no secret before his overseas debut, the trip set the tone for his administration's relations with Europe.

"He came into office dismissive of NATO, hostile to the European Union and seemingly ready to turn his back on America's traditional democratic allies in favor of building a new relationship with Russia and pursuing what he calls ‘America First,'" said Kupchan. "That caused an enormous amount of consternation on the other side of that, so much so that after Trump's first visit to Europe, Chancellor Merkel goes back home and says, ‘We can't rely on our friends like we used to.'"

Merkel issued her thinly-veiled criticism of the Trump administration and the U.K.'s decision to exit the European Union just days after the conclusion of the G-7 summit, at which Trump had said Germany is "very bad" on trade.

"Since then, I think both sides have sobered up. And the Europeans, they have made it clear that they're not going to wait around for Trump when it comes to the Paris agreement or to free trade or to European integration," Kupchan said. "And I think Trump, on his part, has become more skeptical of the idea of rapprochement with Russia, he has supported a strong NATO, he went back to Europe soon after his last trip, which is quite unusual, to build a stronger relationship with Macron, so I would say things have moved in the right direction."

During a sweeping speech in Poland on his second trip to Europe, which took place earlier this month, Trump made explicit his support for the Article 5 collective defense commitment of NATO, a move that was viewed by some as an acknowledgement that his initial reluctance to back the article had ruffled feathers. His endorsement marked a nearly complete reversal from his previous claim that NATO had become "obsolete."

Trump also dialed up his tough talk on Russia to its highest level yet during his second trip to Europe when he called out the Kremlin for its "destabilizing activities" in Syria and Ukraine and pressed Russian President Vladimir Putin directly and repeatedly about his country's efforts to meddle in the 2016 presidential race. He later said it was unlikely he will invite Putin to the White House in the foreseeable future and nixed the idea of quickly forming a cybersecurity working group with the Russians, both of which brought the president further from his original goal of thawing the ice between Washington and the Kremlin.