A mural in Vilnius, Lithuania. Trump sees strength and cynicism in Putin. Putin sees in Trump a grand opportunity. Photograph by Aleksandr Lukjanov / Alamy

Vladimir Vladimirovich Putin and Donald J. Trump are locked in a humid political embrace, which seems, at first glance, unlikely. Putin grew up in postwar Leningrad. In the dismal courtyard of his building on Baskov Lane, a hangout for local thugs and drunks, he and his childhood friends pursued their favorite pastime: chasing rats with sticks. His father, a wounded veteran, beat him with a belt. Putin’s way up, his dream, was to volunteer for the K.G.B. Donald Trump encountered few rats on his lawn in Jamaica Estates. Soft, surly, and academically uninterested, Donald was disruptive in class—so much so that his father, a real-estate tycoon of the outer boroughs, shipped him off to military school when he was thirteen. He did not set out to serve his country; he set out to multiply his father’s fortune. “When I look at myself in the first grade and I look at myself now, I’m basically the same,” Trump has said. “The temperament is not that different.”

Decades later, Trump has praised Putin as a forceful leader, a “better leader” than Barack Obama; Putin hardly conceals his hope that Trump will win election to the White House. What would be more advantageous for Putin than to see the United States elect an incompetent leader who just so happens to be content to leave the Russian regime to its own devices, particularly in Europe? Even as non-Democrats have variously described their own nominee as a “con,” a “bully,” and a “borderline” 9/11 conspiracy theorist, Putin has acted as a surrogate from afar, dropping clear hints at his preference, slyly declaring Trump “bright” and “talented without doubt.”

The Times has reported that hackers who broke into the Democratic National Committee’s e-mail trove—a cyber version of the Watergate burglary—were likely agents of the Russian Federation. We shall see if that suspicion holds up. But what’s undisputed is that the gathering of kompromat—compromising material—is a familiar tactic in Putin’s arsenal. For years, the Russian intelligence services have filmed political enemies in stages of sexual and/or narcotic indulgence, and have distributed the grainy images online. Last April, state TV broadcast a black-and-white film of Mikhail Kasyanov, Putin’s former Prime Minister but now a potential opposition leader, exchanging carnal favors and playing “Name That Tune” with his political assistant, Natalya.

Even if the Russian government is not responsible for the hack on the D.N.C., Putin’s affinity for Trump is clear. Some part of it may be a matter of kindred temperament. Just as Trump talks ominously about Mexican “rapists” and tens of thousands of “illegal immigrants ... roaming free” in the land, Putin won early popularity by vowing to dispense with terrorists from the Caucasus: “We will ice them in their shithouses.” Trump is, after all, a kind of parody of Putin: the bluster, the palaces. As the historian Timothy Snyder puts it, “Putin is the real-world version of the person Trump pretends to be on television.”

The fellow-feeling between the two is complex, but it is not hard to see who gets the better of whom. Trump sees strength and cynicism in Putin and hopes to emulate him. Putin sees in Trump a grand opportunity. He sees in Trump weakness and ignorance, a confused mind. He has every hope of exploiting him.

Putin’s view of the world­­—of the future of Russia and its increasingly dangerous confrontation with the West—is rooted in the fall of the Soviet Union. His behavior and his resentments, to say nothing of his shrewd foray into our current electoral follies, are based entirely on that event.

Twenty-five summers ago, Communist ideology and the Soviet Union itself teetered on the brink of nonexistence. On the morning of July 23, 1991, two newspaper articles appeared that, each in its own way, signalled the end.

A liberal paper called Nezavisimaya Gazeta (The Independent Newspaper) published a leak of a new draft platform for the Communist Party. The draft rejected Marxist-Leninist ideology in favor of European-style social democracy, and it “unconditionally” condemned the “crimes” of the Stalin regime, which “broke and maimed the lives of millions of people, whole nations.” The draft had the endorsement of Mikhail Gorbachev, who was still the Party’s General Secretary, but of no more than a third of the Central Committee.

That same morning, Sovyetskaya Rossiya (Soviet Russia), the most prominent daily outlet for orthodox Communists and hardcore Russian nationalists, published a front-page call to arms called “Slovo k Narodu” (“A Word to the People”). The appeal, signed by leading figures in the military, the security apparatus, and the right-wing intelligentsia, accused Gorbachev and more radical reformers of leading the Soviet Union to ruin. Only if the “healthy forces” of state power united and acted swiftly could “humiliation” and “fratricidal war” be averted.

“An enormous, unforeseen calamity has taken place,” it read. “The Motherland, our country, a great power, given to us by nature, with its glorious ancestors, is perishing, breaking apart, falling into darkness. And this collapse is taking place with our silent acquiescence and tolerance. Brothers, we are late in waking to this, late in observing the misery when our home is already aflame in every corner. We must extinguish this blaze not with water but with our tears and blood.”

The florid apocalyptic language was distinctly that of one of the signatories, Aleksander Prokhanov, the editor of a reactionary newspaper called Dyen’ (The Day). Prokhanov, a third-rate novelist, was closely connected with the Army and the intelligence services. He was widely known around Moscow as “the Nightingale of the General Staff.” For many months, Prokhanov’s paper had given vent to the anger of important figures in the Soviet hierarchy. At a certain point, these men no longer cared that they were speaking in defiance of Gorbachev. They saw a world coming to an end, and with it their positions, their privileges. In order to preserve at least the rudiments of the old order, they were prepared to defy Gorbachev and anyone else they judged to be betraying them. In one interview, published in 1991, Oleg Baklanov, Gorbachev’s assistant in charge of the military-industrial complex, told Prokhanov, “The bones of the defense industry are breaking.” The Soviet Union was weak, and losing its capacities as a superpower. Prokhanov replied that perhaps, in order to avoid the collapse of Soviet power, “one should spit upon the legal technicalities and impose a dictatorship.”

These hints that the conservative forces in the Soviet leadership were emboldened and planning some sort of putsch against Gorbachev did not come as a shock to the first Bush Administration. As early as July, 1989, Eduard Shevardnadze, Gorbachev’s Foreign Minister, had told Secretary of State James Baker, “In time there could be danger of civil war and dictatorship.” The C.I.A. did not think a putsch was necessarily imminent, but with every month there were broad indications—then more booming ones. In December, 1990, Shevardnadze resigned his post, declaring publicly, “A dictatorship is coming.”

And in June, 1991, just weeks before the publication of “A Word to the People,” Gavriil Popov, a liberal and the mayor of Moscow, went to Spaso House, the residence of American Ambassador Jack Matlock, and told him that a coup was being planned. Matlock sent an emergency “flash cable” to Baker, who, in turn, told Bush; the Americans also informed both Gorbachev and the Russian President, Boris Yeltsin. Gorbachev, who had grown accustomed to a more or less permanent state of crisis and embattlement, somehow did not take the warning seriously. This was a mistake.