President Trump and Russian President Vladimir Putin meet on the sidelines of the G-20 summit in Osaka, Japan. “We look forward to spending some pretty good time together,” Trump said. (Michael Klimentyev/Pool/Sputnik/EPA-EFE/Shutterstock)

President Trump’s dismissive response Friday when asked whether he would hold Russian President Vladimir Putin to account for election interference revealed anew how he can appear more comfortable in the company of strongmen than among fellow leaders of democracies.

At the Group of 20 meeting in Osaka, Japan, Trump made dutiful rounds among the likes of host Prime Minister Shinzo Abe and German Chancellor Angela Merkel, but he reserved most of the sought-after sit-down time slots for authoritarians or like-minded nationalists with similar views on immigration.

In addition to Putin, Trump is meeting with Chinese President Xi Jinping and Saudi Crown Prince Mohammed bin Salman, who was positioned prominently in the front row next to Trump in the official group photo Friday.

Trump also used the annual economic summit to meet with Brazil’s far-right leader, Jair Bolsonaro, who styles himself the “Trump of the Tropics”; Turkish President Recep Tayyip Erdogan, who has chipped away at his nation’s democratic institutions; Indian Prime Minister Narendra Modi, who won reelection this year on a platform that stoked sectarian tensions; and Australian Prime Minister Scott Morrison, whose hard line against immigration he admires.

Late Friday, Trump tweeted a friendly invitation to meet with North Korean dictator Kim Jong Un in the demilitarized zone while the president is in South Korea this weekend after his G-20 meetings.

“While there, if Chairman Kim of North Korea sees this, I would meet him at the Border/DMZ just to shake his hand and say Hello(?)!” he wrote. Trump is eager to restart his stalled nuclear talks with Kim.

Trump does not disguise his boredom or displeasure with the forced glad-handing at international meetings such as the G-20 summit, and he has used similar gatherings to pick fights with European and Canadian allies over trade and military spending.

But Trump was looking forward to this event, according to aides, in large part because he wanted the chance to speak to both Putin and Xi face to face.

The mood at the beginning of his Friday morning meeting with the Russian leader was jovial. Trump was laughing and enjoying himself, including at the expense of a free press, as he greeted Putin for their first meeting since former special counsel Robert S. Mueller III released a report this spring that found extensive Russian efforts to influence the 2016 election and establish contacts with the Trump campaign.

Asked by a reporter whether he would use the session to warn Putin not to attempt to interfere in the 2020 election, a smirking Trump theatrically turned to Putin.

“Yes, of course, I will,” Trump said. “Don’t meddle in the election, president. Don’t meddle in the election,” he said, holding up an index finger in mock headmaster mode. Both men laughed.

Before the two leaders addressed reporters, cameras recorded chitchat that included joking commiseration about the press.

“Get rid of them,” Trump cracked to Putin, under his breath.

“Fake. Fake news,” Trump could be heard saying. “You don’t have this problem in Russia, but we have it.”

Putin gave a knowing smile and responded in English.

“Yes, yes, yes, we have it,” he told Trump, still smiling. “It’s the same.”

Trump frequently attacks the press and uses journalists as a foil, casting himself as a victim of malicious or agenda-driven coverage and encouraging his political supporters to do the same.

But he has rarely taken the step apparent here, seeming to approve of or express envy for Putin’s power to silence a critical press.

Journalists who have investigated alleged government corruption or written critically about Putin or other government officials have been killed in Russia, including two in 2017, and this month police allegedly tried to frame investigative journalist Ivan Golunov on drug charges, which were dropped after an outcry.

The chummy scene in Japan contrasted with Putin’s earlier greeting with British Prime Minister Theresa May, who has accused Russia of a chemical weapons assassination attempt on British soil last year.

May remained stone-faced and stiff-armed as she shook hands with Putin, her body turned awkwardly toward news cameras instead of fully toward the Russian leader.

“She told the President that there cannot be a normalisation of our bilateral relationship until Russia stops the irresponsible and destabilising activity that threatens the UK and its allies — including hostile interventions in other countries, disinformation and cyber attacks — which undermine Russia’s standing in the world,” May’s office said in a statement after the meeting.

Putin arrived at the G-20 after giving a rare interview to Western media. He told the British newspaper the Financial Times that the liberal international order is obsolete, and he praised the rise of populism in Europe and the United States.

He said the idea of multiculturalism is “no longer tenable” and echoed Trump’s criticism of Merkel for allowing a tide of migrants into Germany in 2015.

The interview was interpreted as an overture to the pro-Brexit Boris Johnson, the most likely successor to the outgoing May, but could also be read as a gesture to Trump.

“This liberal idea presupposes that nothing needs to be done. That migrants can kill, plunder and rape with impunity because their rights as migrants have to be protected,” Putin said.

Sitting with Putin on Friday, Trump ticked through some of the items on their agenda, “including trade, and including some disarmament and some — a little protectionism, perhaps, in a very positive way.”

Trump canceled their last scheduled sit-down, in November, over Russia’s seizure of Ukrainian ships and sailors, who remain detained. The two did meet later, at the G-20 in Argentina, for what the White House called an informal session.

This meeting was the first on full view since last July, when Trump was widely criticized for taking Putin’s word that Russia had not interfered in the last election, despite the findings of the U.S. intelligence community, a deferential posture that even some congressional Republicans heavily criticized.

Similarly, Trump has faced a minor revolt among congressional Republicans over his handling of allegations that the Saudi crown prince ordered the murder of dissident Saudi journalist Jamal Khashoggi, a Washington Post contributing columnist.

“Today, Trump joked with Putin about interfering in our elections. He joked about getting ‘rid of’ journalists with a man who has reporters murdered,” Democratic presidential candidate Sen. Elizabeth Warren (Mass.) tweeted Friday. “The president is looking out for himself — not the American people. We need a president who will always stand up for American values.”

Sen. Tim Kaine (D-Va.) was also critical.

“Nothing that guy does surprises me,” Kaine said. “It’s shocking to me that we have a president who would basically prostitute any value we have so he could get an edge. He’s got no public service gene that makes him think at all about anybody else other than himself.”

Trump has long said he wants a more productive nation-to-nation relationship with Russia and points to areas where he says the two countries should work together, including arms control.

That goal of cooperation where possible was shared by President Barack Obama, but for Trump it is clouded by Russian actions in 2016 and his reluctance to denounce them.

Now, particularly with the Mueller report behind him, Trump appears less and less concerned about those clouds.

“We’ve had great meetings,” Trump said in Osaka, sitting alongside Putin. “We have had a very, very good relationship. And we look forward to spending some pretty good time together. A lot of very positive things going to come out of the relationship.”

Nakamura and Kim reported from Osaka. Emily Davies and Alice Crites contributed to this report.