But underlying all of this, there was an even stronger impulse: the fantasy of Russia itself. Long before the Bolshevik Revolution gave the dream a very particular political content, Shaw was primed to expect a global spiritual resurrection that would begin in Russia. This hope was not as fanciful as it may now seem: In the late 19th century, when Shaw’s political and artistic consciousness was being formed, Russian music, drama and literature were at the leading edge of modern Western culture. As he later wrote to Maxim Gorky, “I myself am as strongly susceptible as anyone to the fascination of the Russian character as expressed by its art and personally by its artists.”

The creation of G.B.S. owes almost as much to Russia as it does to Ireland or England. He learned much of his political style from anti-czarist exiles in London, especially the anarchist Peter Kropotkin and the nihilist Sergius Stepniak. Arguably Shaw’s greatest play, “Heartbreak House,” is subtitled “A Fantasia in the Russian Manner on English Themes” and was greatly influenced by Chekhov.

Above all, Shaw was caught up in the great wave of enthusiasm for Tolstoy that broke over the English-speaking world in the mid-1880s when “War and Peace,” “Anna Karenina” and most of his other works appeared in translation. Shaw called Tolstoy “the master.” His own insistence on the didactic purpose of art and his forging of a sage-like persona are pure Tolstoy.

This was not just a matter of artistic influence. Russia became, for Shaw, a kind of alternate universe, an imaginative field in which grandiosities that he would otherwise have delighted in puncturing were given free rein. He would have made devastating fun of anyone writing about “the Irish soul,” or “the English soul,” but he was happy to write without irony of “the soul of the Russian people.” When Kropotkin’s daughter told him that “the Russians would give the world back its lost soul,” Shaw did not scoff. Rather, as he wrote to Gorky, “I quite understand that; it is not at all ridiculous to me.”

It was, of course, Marx who wrote that everything in history happens twice, “the first time as tragedy, the second time as farce.” There is something tragic in Shaw’s journey from Tolstoy to Stalin, from seeing Russia as the place to give the world back its lost soul to his eventual embrace of the Soviet project as “the only hope of the world.” But perhaps this same impulse is now with us — in full-on farcical mode.

Vladimir Putin is no Stalin, and the white nationalists around Donald Trump are certainly no Shaws. But some of the same impulse is still at work: the tendency to fantasize about Russia as the vigorous counterweight to a supposedly decadent West. There is the same impatience with the messiness and inefficiency of democracy, and it leads to the same crush on the strongman leader who can cut through the irrelevant natterings of parliaments and parties.

Shaw’s infatuation with Russia became a full-on love affair with a Soviet autocrat, whereas the Trump bromance with President Putin appears unconsummated. But they share a fatal attraction that both preceded and survived the Soviet Union: the allure of a faraway place where the great leader is obeyed because he embodies a people’s soul.