In the Obama administration’s last days, some White House officials scrambled to spread information about Russian efforts to undermine the presidential election — and about possible contacts between associates of President-elect Donald J. Trump and Russians — across the government. Former American officials say they had two aims: to ensure that such meddling isn’t duplicated in future American or European elections, and to leave a clear trail of intelligence for government investigators.

American allies, including the British and the Dutch, had provided information describing meetings in European cities between Russian officials — and others close to Russia’s president, Vladimir V. Putin — and associates of President-elect Trump, according to three former American officials who requested anonymity in discussing classified intelligence.

Separately, American intelligence agencies had intercepted communications of Russian officials, some of them within the Kremlin, discussing contacts with Trump associates…

At the Obama White House, Mr. Trump’s statements stoked fears among some that intelligence could be covered up or destroyed — or its sources exposed — once power changed hands. What followed was a push to preserve the intelligence that underscored the deep anxiety with which the White House and American intelligence agencies had come to view the threat from Moscow.

It also reflected the suspicion among many in the Obama White House that the Trump campaign might have colluded with Russia on election email hacks — a suspicion that American officials say has not been confirmed. Former senior Obama administration officials said that none of the efforts were directed by Mr. Obama.