The comparison was startling even for Mr. Trump. Having tea with the queen of England is hardly the same as taking clandestine help from agents of President Vladimir V. Putin as part of a concerted campaign by Russian intelligence to tilt an American presidential election.

American law makes it a crime for a candidate to accept money or anything of value from foreign governments or citizens for the purposes of winning an election. Many lawyers argued about whether incriminating information, as Mr. Trump’s campaign in 2016 agreed to take from the Russian government, would qualify as a thing of value.

The president’s interview came on the same day that his son Donald Trump Jr. appeared on Capitol Hill to answer questions from lawmakers. During the 2016 campaign, the younger Mr. Trump — along with Jared Kushner, the future president’s son-in-law, and Paul Manafort, then his campaign chairman — met with a Kremlin-connected lawyer after being told she would have “dirt” on Hillary Clinton as “part of Russia and its government’s support for Mr. Trump.”

With his latest comments, Democrats said the president was effectively inviting Russia and other powers to intervene in next year’s election, comparing it to Mr. Trump’s public remarks during the 2016 campaign when he said, “Russia, if you are listening,” it should find and publish Mrs. Clinton’s emails. While Mr. Trump later said he was only joking, Mr. Mueller’s investigators reported that Russian agents tried to do just that hours later.

“The message he seems to be sending now is as long as a foreign power wants to help his campaign, they can count on him having the good discretion not to alert his F.B.I. about it,” Mr. Schiff said. “It is just dangerous, appalling, unethical, unpatriotic — you name it.”

Republicans across the board said they would never do what Mr. Trump suggested. “Certainly, absolutely not,” said Senator Lisa Murkowski of Alaska. “Just say no. Turn it over,” said Senator Cory Gardner of Colorado. Senator Thom Tillis of North Carolina said, “I would go immediately to the authorities, period.”

Yet some Republicans, like Mr. Graham, also tried to turn the tables on the Democrats by pointing to their use of information gathered about Mr. Trump during the 2016 campaign by Christopher Steele, a former British intelligence officer who produced a dossier of reports and rumors about Mr. Trump’s ties to Russia.