MOSCOW—President Vladimir Putin said the Kremlin has no preference in the U.S. presidential elections but Republican candidate Donald Trump does reflect the needs of average people “who don’t like that power is being transferred by inheritance.”

Mr. Trump “is, of course, extravagant,” Mr. Putin said during a televised conference in the southern city of Sochi. “He simply represents the interests of simple people who criticize those who have been in power for decades.”

Democratic nominee Hillary Clinton’s campaign has suggested that Russia is backing Mr. Trump, citing the hacking and leaking of emails from the Democratic National Committee, hacking that U.S. security officials blame on Russia.

Mr. Putin said that Russia’s support for Mr. Trump had been invented by Western media, and that it was part of a “political battle, an attempt to manipulate public opinion on the eve of elections.” He said the Kremlin would welcome any candidate who expressed a desire for improved relations with Moscow.

“For us, it doesn’t really make a difference but of course we can’t not welcome words, thoughts, intentions that are publicly expressed about normalizing relations between the U.S. and Russia,” he said.