Donald Trump had publicly ridiculed the Russia investigation as politically motivated.

President Donald Trump told two senior Russian officials in a 2017 Oval Office meeting that he was unconcerned about Moscow's interference in the U.S. election because the United States did the same in other countries, an assertion that prompted alarmed White House officials to limit access to the remarks to an unusually small number of people, according to three former officials with knowledge of the matter.

The comments, which have not been previously reported, were part of a now-infamous meeting with Russian Foreign Minister Sergei Lavrov and Russian ambassador Sergey Kislyak, in which Trump revealed highly classified information that exposed a source of intelligence on the Islamic State. He also said during the meeting that firing FBI Director James Comey the previous day had relieved "great pressure" on him.

A memorandum summarizing the meeting was limited to all but a few officials with the highest security clearances in an attempt to keep the president's comments from being disclosed publicly, according to the former officials, who requested anonymity to discuss sensitive matters.

The White House's classification of records about Trump's communications with foreign officials is now a central part of the impeachment inquiry launched this week by House Democrats. An intelligence community whistleblower has alleged that the White House placed a record of Trump's July 25 phone call with Ukraine's president, in which he offered U.S. assistance investigating his political opponents, into a code-word classified system reserved for the most sensitive intelligence information.

The White House did not provide a comment Friday.

It is not clear if a memo documenting the May 10, 2017, meeting with Lavrov and Kislyak was placed into that system, but the three former officials said it was restricted to a very small number of people. At the time, the White House had recently begun limiting the records of Trump's calls after remarks he made to the leaders of Mexico and Australia appeared in news reports. The Lavrov memo was restricted to an even smaller group, the former officials said.

A fourth former official, who did not recall the president's remarks to the Russian officials, said that memos were restricted only to people who needed to know their contents.

"It was more about learning how can we restrict this in a way that still informs the policy process and the principals who need to engage with these heads of state," the fourth former official said.

But the three former officials with knowledge of the remarks said some memos of the president's communications were kept from people who might ordinarily have access to them. The Lavrov memo fit that description, they said.

White House officials were particularly distressed by Trump's election remarks because it appeared the president was forgiving Russia for an attack that had been designed to help elect him, the three former officials said. Trump also seemed to invite Russia to interfere in other countries' elections, they said.

The previous day, Trump had fired Comey amid the FBI's investigation into whether the Trump campaign had coordinated with Russia. White House aides worried about the political ramifications if Trump's comments to the Russian officials became public.

Trump had publicly ridiculed the Russia investigation as politically motivated and said he doubted that Moscow had intervened in the election. By the time he met with Lavrov and Kislyak, Trump had been briefed by the most senior U.S. intelligence officials about the Russian operation, which was directed by Russian President Vladimir Putin and included the theft and publication of Democratic emails and the seeded of propaganda in social-media, according to the findings of the U.S. intelligence community.

Trump's firing of Comey touched off an investigation into whether the president had tried to obstruct the FBI's probe. His comments about Comey's dismissal being a relief, which were first reported the same month by the New York Times, reinforced suspicions that Trump dismissed Comey because the FBI was investigating him.

According to the fourth former official, Trump lamented to Lavrov "all this Russia stuff" was detrimental to good relations. Trump also complained, "I could have a great relationship with you guys, but you know, our press," this former official said, characterizing Trump's remarks.

H.R. McMaster, the president's then-national security adviser, repeatedly told Trump that he could not trust the Russians, according to two former officials.

On some areas, Trump conveyed U.S. policy in a constructive way, for instance, telling the Russians that their aggression in Ukraine was not good, one of those former officials said.

"What was difficult to understand was how they got a free pass on a lot of things - election security and so forth," this former official said. "He was just very accommodating to them."

The former official observed that Trump has "that streak of moral equivalency," recalling how he once dismissed a question about the assassination of journalists and dissidents in Putin's Russia by telling Fox News' Bill O'Reilly, "There are a lot of killers. You think our country's so innocent?"

Another former official said that Trump wasn't the only one to conflate Russia's interference in the U.S. elections with U.S. efforts to promote democracy and good governance abroad.

The president and his top aides seemed not to understand the difference between Voice of America, a U.S.-supported news organization that airs in foreign countries, with Russian efforts to persuade American voters by surreptitiously planting ads in social media, this person said.

One former senior official said Trump regularly defended Russia's actions, even in private, saying no country is pure. "He was always defensive of Russia," this person said, adding the president had never made such a specific remark about interference in their presence.

"He thought the whole interference thing was ridiculous. He never bought into it."