Information provided by the CIA helped Russian security services foil an attack on St Petersburg's Kazan cathedral, US and Russian leaders say.
President Vladimir Putin phoned Donald Trump to thank him for the information, the White House and Kremlin confirmed.
The attack was allegedly planned to take place on Saturday, Russia says.
A White House statement said "terrorists" were captured prior to an attack "that could have killed large numbers of people".
Russia's FSB security service said in a statement on Friday that it had detained seven members of a cell of Islamic State supporters and seized a significant amount of explosives, weapons and extremist literature.
The cell was planning to carry out a suicide attack at a religious institution and kill citizens on Saturday, the FSB statement said (in Russian).
The group was preparing explosions targeting the cathedral and other public places in Russia's second city, the Kremlin statement said on Sunday.
Mr Putin told Mr Trump that Russia's special services would hand over information on terror threats to their US counterparts, it added.
Mr Putin had asked the US president to pass on his thanks to the CIA director and the operatives involved, both countries said.
US intelligence agencies, including the CIA, believe that Russia tried to sway last year's US presidential election in favour of Mr Trump - claims rejected by the Republican.
A special counsel is investigating whether anyone from the Trump campaign colluded.
While Mr Trump categorically denies colluding with Russia, he has talked about the importance of working together "constructively".
Sunday's conversation between the two presidents marks the second time the two men have spoken in a week.
On Thursday they discussed North Korea and Mr Trump thanked Mr Putin "for acknowledging America's strong economic performance" in his annual press conference, according to the White House.