Pedestrians walk through Red Square on March 3, 2017 in Moscow, Russia.Spencer Platt / Getty

Among the reasons President Donald Trump has cited for seeking a better relationship between the United States and Russia is the number of common evils the two countries face, including terrorism. “Wouldn’t it be great,” he has mused, “if we actually got along with Russia and other countries?”

The furor in the United States over Russia’s role meddling in the country’s 2016 presidential election—and the U.S. intelligence community’s investigations into, and public leaks about, possible contacts between Trump associates and Russian intelligence—may stifle Trump’s hopes for getting along with Russia before he can even try. Indeed, the current spy wars between American and Russian intelligence have a long history, and go a long way toward explaining why meaningful U.S.-Russia cooperation was unlikely to begin with.

It’s not that the FSB, the major Russian intelligence agency, has never been able to work with its American counterparts. The most romantic period of their relationship was in 2013, following the April 15 Boston Marathon bombings, which killed three people and injured some 250. Two brothers from the Russian republic of Chechnya, Dzokhar and Tamerlan Tsarnaev, had organized the attack, and it became known soon afterward that the Russian FSB had sent messages in 2011 to the FBI and CIA about Tamerlan Tsarnaev. Though these letters were not real warnings—the FSB asked for information on him, fearing he could join a militant group—the information inflamed public opinion in the United States, and there were calls for more cooperation between Russian and American intelligence agencies. Russian President Vladimir Putin and U.S. President Barack Obama spoke twice by phone in the wake of the bombing. A White House statement said Obama praised the “close cooperation” Washington received on counterterrorism from Moscow, and that “both sides underlined their interest in deepening” it. Congressmen rushed to Moscow praising FSB’s willingness to work together.

It had long been assumed that militants in the North Caucasus were not interested in attacking Western targets. After the 1990s, the Chechen movement shifted from what had been a primarily nationalist agenda to make Chechnya independent, to one embracing radical Islam. Militants continued to employ a terrorist strategy against the Russians—including attacking civilians in Moscow, and killing law-enforcement personnel in the North Caucasus. But foreigners had not been in their crosshairs. Ahead of the 2014 Olympics in Sochi, at the foot of the Caucasus Mountains near the Islamists’ stronghold, the Boston bombing raised questions about whether that had changed.

Yet within a month after the Boston bombings, the FSB arrested Ryan Christopher Fogle, a third secretary in the political section of the U.S. embassy. The FSB alleged he was a CIA officer and accused him of trying to recruit an FSB counterterrorism officer who was involved in Russia-U.S. counterterrorism cooperation. The Russian agency wanted to make the lesson and the story public—a colorful video with a confused Fogle wearing a ludicrous wig was shown on Russian TV, and the diplomat was thrown out of the country. The counterterrorism officers in the FSB quickly learned the possible costs of close cooperation with the Americans.

But apparently it didn’t discourage the Americans from trying. In February 2015, long after the war in Ukraine started and Crimea was annexed, Alexander Bortnikov, the FSB’s director, went to Washington at the Americans’ invitation to take part in a summit on countering violent extremism. (At the time, The New York Times wondered why the White House did not invite FBI director James Comey, then “the most senior American official charged with preventing terrorist attacks.”) By then Bortnikov had already been hit by European Union sanctions, but he was not on the U.S. sanctions list.

Hunting down hackers was another area where the Russians, the British, and the Americans seemed to be willing working together. This story also had its romantic moments. For some years the U.S. and Russia had the Russian-American Law Enforcement Working Group, which covered a range of topics, including financial crime, cybercrime, and child protection. It yielded some results. In October 2014, for example, Sergei Tsurikov, a leader of a cybercriminal group that had stolen over $9.4 million from a credit card processor, was sentenced to 11 years in prison due in part to the cooperative efforts of the FSB and the FBI. This cooperation stalled after the annexation of Crimea, and the story of the DNC hack damaged any remaining hope for the resurrection of cooperation in cyber.

Trump may have believed he could revive this cooperation. At least the Kremlin seemed to want him to; Russia's Foreign Minister Sergei Lavrov hinted at willingness to do so when told Christiane Amanpour in October that Russia was still waiting for the United States to respond to the proposal made by the Russian General Prosecutor Office to start “professional consultations on cyber crime.”

But then in mid-January the Russian daily Kommersant broke the story about arrests in the Information Security Center of the FSB and Kaspersky Lab, a leading Russian cyber security and antivirus company. All of those arrested had had extensive contacts with the Western security services, for one reason: They were fighting criminal hackers, and Russian hackers tend to live in Russia, but hack globally.

The most famous among the four people arrested was Sergei Mikhailov, the deputy chief at the FSB’s Information Security Center, which is the FSB’s main unit involved in hunting down hackers. Mikhailov was involved in many cyber investigations. But the community of cyber experts was truly shocked at the arrest of Ruslan Stoyanov, the head of Kaspersky's computer incidents investigations team. The department he ran consulted the Interior Ministry and the FSB on investigating cyber crime cases. Just before his own arrest, Stoyanov had helped collect evidence in the country’s biggest-ever crackdown on financial hackers, involving the arrest of 50 members of a cyber-crime ring known as Lurk that stole more than 3 billion rubles ($45 million) from banks in Russia and other countries. The group had also exploited weaknesses in how banks connect to Swift, the global payments network, to steal $81 million from Bangladesh’s central bank and $12 million from an Ecuadorean bank.

Mikhailov and Stoyanov had been arrested in early December, but the news about the arrests broke only in January—after the publication of a U.S. intelligence report about the hacking of the DNC, which suggested that American intelligence agencies had human intelligence sources in Moscow. The Kremlin, evidently, was nervous. There were some reports in pro-Kremlin media that huge sums of cash were found at Mikhailov’s house, but he and Stoyanov had been accused not of corruption but of state treason. The official version is that they were arrested because they had been passing information to the Americans.

The cases represent a serious blow to the entire area of investigating cyber crimes, in Russia and abroad. For decades the Russian secret services enjoyed close relations with Russian cyber security companies like Kaspersky Lab, asking for tech advice and expertise. And in the 2010s the Interior Ministry and the FSB were full of ambitious officers who wanted to make their mark cooperating with their Western counterparts in law enforcement. But Moscow is now full of rumors that the offices of other cyber security companies were raided by FSB investigators as part of an extensive mole-hunt operation.

It’s a Russian and Soviet tradition to sacrifice everything for the safekeeping of secrets. And it is a time-honored tactic to shut down any possible ways of leaking sensitive information to outsiders by sending them to jail. The cooperation between the secret services of Russia and America was doomed to end up disastrously—with arrests and spy scandals, when and where it suited the Kremlin. It’s doubtful the story will change under the Trump administration.

We want to hear what you think about this article. Submit a letter to the editor or write to letters@theatlantic.com.