Information provided by the CIA helped Russian security services foil an attack on St Petersburg’s Kazan cathedral, the Kremlin says.
The attack was allegedly planned to take place on Saturday, officials say.
In a phone call, President Vladimir Putin thanked Donald Trump for the CIA’s intervention, the Kremlin said.
Mr Putin told Mr Trump that Russia’s special services would hand over information on terror threats to their US counterparts, it added.
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.
It added that Mr Putin had asked the US president to pass on his thanks to the CIA director and the operatives involved.
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.