OSAKA, Japan—President Trump was about to start his meeting with Vladimir Putin when a reporter threw out a question: Would he tell his Russian counterpart not to interfere in the 2020 U.S. presidential election?

“Don’t meddle in the election, president,” Mr. Trump said, with a hint of a grin. Then he wagged his finger at Mr. Putin and repeated: “Don’t meddle in the election.”

Mr. Putin made a half-smile of his own, and the two men left to start a private meeting on the sidelines of a Group of 20 summit of leading world economies. A White House statement said the leaders discussed global issues including Syria, but made no mention of further discussion of election interference.

The exchange drew criticism in the U.S. Democratic Sen. Chuck Schumer tweeted that “President Trump is basically giving Putin a green light to interfere in 2020.” He said Mr. Trump was “joking with Putin about interfering in our elections, but the joke is on us and Putin’s the only one laughing.”

Mr. Trump called his relationship with Mr. Putin “very, very good” and said: “It’s a great honor to be with President Putin.”