For dinner on Thursday, French President Emmanuel Macron chose to dine with President Trump at Le Jules Verne, an opulent restaurant nestled in the Eiffel Tower that has earned a Michelin star yet still carries the reputation of being an overpriced tourist destination.

The extravagant meal capped off a day filled with frequent backslaps, handshakes, toothy smiles, knee pats, photo ops and a shared determination to find common ground.

Up until now, the relationship between these two world leaders has been largely defined by their stark differences — Trump vs. the international anti-Trump — and a defining moment occurred in May when the boyish 39-year-old French centrist fought for dominance in a white-knuckle handshake with the red-faced 70-year-old U.S. president in front of reporters and cameras. (Trump has since had a birthday.)

But as their presidencies slowly age, it is becoming clear the two leaders have a lot in common.

Both are political outsiders holding their first elective positions and relish having defied their countries’ main political parties, and they maintain contentious relationships with the media. Both have pledged to dramatically shake up the establishment and rid their capitals of power players and bureaucrats who have long wielded influence. Both have stressed business-friendly policies and promised to roll back regulations.

Both are seeking to confront terrorism with actions critics say could infringe on the freedoms of their citizens.

And Trump and Macron also appear to enjoy the opulence of places such as Le Jules Verne and the pomp that accompanies being a world leader. In the two months that Macron has been president, he has made two major public declarations at Versailles, while Trump likes to give television crews tours of the Oval Office and has hosted several events in the Rose Garden.

Macron’s allies are quick to challenge comparisons to Trump, arguing that former president Barack Obama is a better match, but his critics contend the emerging similarities are more than superficial.

“They both want a monopoly on public attention and are attracted by constant media coverage. And there is a similar kind of narcissism in their attraction to power,” said Patrick Weil, a French constitutional scholar and leading historian of immigration. “Both show a will to govern without the Parliament and against the press — without any separation or balance of power.”

For his part, Macron has quickly and quietly amassed an authority that Trump could only dream of possessing. In a country where the executive is already stronger than in many of its Western counterparts, the new president will govern largely with a coalition entirely of his own creation — with deputies he himself hand-selected. The new party that Macron created — “En Marche!” (Onward) — bears his initials, which some see as Macron placing himself at the center of political life. The French media has likened him to a “Jupiter” in the Elysee Palace and called him the “sun president,” a playful recasting of the “sun king,” another name for Louis XIV, France’s iconic monarch.

Last week, Macron gave a 90-minute address to both houses of Parliament at Versailles and announced his intent to get rid of one-third of France’s 577 parliamentary deputies, in front of the very deputies whose positions would conceivably be eliminated.

“The French people have shown their impatience with a political world made up of sterile quarrels and hollow ambitions in which we have lived up until now,” Macron said.

(Emmanuel Macron/Facebook)

It was a more poetic version of Trump’s popular rallying cry: “Drain the swamp!”

When Trump and Macron stand side-by-side — as they did during a news conference on Thursday afternoon in a gilded ballroom at Paris’s Elysee Palace — it can be difficult to spot any similarities.

Trump towers over Macron but often slumped or leaned heavily on his lectern with his suit jacket unbuttoned, his hair a bit unruly and his face in a scowl. He agreed to this trip at the last minute and showed up with an entourage that did not include anyone from the State Department — and he has yet to name an ambassador to France. He spoke in vague proclamations instead of specifics. “We will talk about that over the coming period of time,” he said of his decision to withdraw the United States from the Paris climate accord and whether he might revisit it. “And if it happens, that’ll be wonderful. And if it doesn’t, that’ll be okay, too. But we’ll see what happens.”

Meanwhile, Macron wore a closely tailored dark suit that was buttoned and he stood at perfect attention, his hair neatly in place. He prepares extensively for public appearances such as this one and filled his remarks with purposeful talking points, speaking with precision — and, at times, in English. Macron went out of his way to avoid conflict with Trump or highlight their differences, despite the U.S. president’s deep unpopularity in France.

Earlier in the afternoon, Trump and first lady Melania Trump met with Macron and his wife at Les Invalides, a historic complex in central Paris that is home to Napoleon Bonaparte’s tomb. As the two couples exchanged pleasantries, Trump sized up Brigitte Macron and commented: “You’re in such good shape.” He then repeated the comment to President Macron, who has proudly filled half his cabinet positions with women and insisted on absolute gender parity for his party’s ticket in France’s recent parliamentary elections.

From there, the two traveled to Elysee Palace to meet one-on-one and then discussed terrorism and other pressing issues with their top aides.

On the campaign trail, Trump promised to “bomb the s---” out of the Islamic State, seize oil from land it controls, kill the relatives of suspected terrorists and bring back waterboarding. In December 2015, Trump proposed temporarily banning all foreign Muslims from entering the United States, and as president, he signed two executive orders that tried to temporarily limit the entrance of people from several predominantly Muslim countries.

Macron was accused of being too soft on terrorism during the French campaign, a charge that has vanished in his first few months as president. He stunned French liberals — many of whom supported him in the election — when he proposed making permanent some portions of French law that grants the government a host of temporary powers during times of crisis to ensure national security.

France has been under an official “state of emergency” since Nov. 14, 2015, the day after Islamic State militants orchestrated a series of deadly attacks on a Paris concert hall and cafes, killing 130. In the 18 months since then, police have been able to conduct warrantless home searches and place individuals under house arrest if they appear “suspicious” in any way.

To the chagrin of civil liberties advocates, Macron has proposed making certain these powers are permanent — albeit with a judicial review component. On Tuesday, more than 200 French academics and researchers condemned the state of emergency in a harshly worded public letter.

While Macron has condemned Trump’s travel ban and comments about Muslims, he has done little since taking office to help migrants displaced by conflicts in the Middle East resettle in his country.

Jacques Toubon, France’s public defender of civil liberties and a former justice minister, likened Macron’s recent proposal to a French Patriot Act, and criticized what he called the law’s “fluid, cloudy” definitions of terrorists and terrorism. “What does it mean, ‘terrorist?’ ” Toubon asked. “What does it mean, ‘terrorism?’ ”

The gray areas, he said, were “dangerous for our national cohesion.”

“There needs to be a debate,” Toubon said of the proposal. “The people, the Parliament, the intellectuals must debate this question — or the question will never come to be debated.”

After giving brief remarks Thursday, Trump and Macron prepared to take four questions from reporters — a rarity for the two leaders, who have largely avoided the media.

Trump has called the media the “enemy of the people” and often labels stories he does not like “fake news.” Hours before boarding his flight to Paris, Trump tweeted that the media has launched “the greatest Witch Hunt in political history” against his eldest son, who admitted this week to meeting with a Russian lawyer in hopes of learning damaging information about Democrat nominee Hillary Clinton during the 2016 campaign.

Macron, meanwhile, tried to hand-select which journalists would accompany him on a recent trip to visit French troops stationed in West Africa and has accused French reporters of leading a “manhunt” during the election. He also broke with the tradition of holding a news conference on Bastille Day, which is Friday. An Elysee official told Le Monde newspaper that Macron’s “complex thought process lends itself badly to the game of ­question-and-answer with journalists.”

When it came time for the last question of Thursday’s news conference, Macron prompted Trump with a reminder: “One last question, for an American journalist.” Trump then called on a correspondent for a Chinese television network who is based in France, who asked about his relationship with Chinese President Xi Jinping.

Hours later, Trump and Macron reconvened at the Eiffel Tower for dinner, huddling with their wives at a table next to a wall of windows as the crimson sun fell toward the horizon, illuminating the historic city’s skyline.

When asked about his first day in Paris, Trump responded: “Very good.”