WASHINGTON — President Trump, in the words of a former C.I.A. director, Michael V. Hayden, appeared “raw, naked and unfiltered.” John O. Brennan, another former spy chief, called the president’s performance “treasonous.” And Mark M. Lowenthal, a former C.I.A. assistant director and congressional intelligence official, said it was “just beyond the pale.”

Mr. Trump has frequently questioned the conclusions of his own spies that Russia attempted to influence the 2016 presidential election and has tried to do the same regarding potential Russian meddling in this year’s midterms. But this time he did it standing next to President Vladimir V. Putin of Russia, who has repeatedly denied that Russia made any effort to interfere in the vote — a denial that American intelligence officials say is a nothing more than a hollow lie.

But not Mr. Trump. Asked Monday at his news conference in Helsinki whether he believed his own people or Mr. Putin, the American president appeared to come down on the side of the Russian leader. Mr. Putin was “extremely strong and powerful in his denial today,” Mr. Trump said.

Then Mr. Trump seemed to throw his support behind a proposal from Mr. Putin for some kind of joint investigation into the 12 Russian intelligence officers indicted last week by Robert S. Mueller III, the special counsel, for their alleged role in hacking into Democratic Party servers and state election systems in 2016.