The man who wrote those words is now the Republican candidate for the United States Senate from Alabama. In some ways, this is an embarrassment for Donald Trump, who heeded establishment advice to support Moore’s opponent, sitting Senator Luther Strange, in the primary. But Moore’s victory is also a victory for Trumpism, a populist movement that has eroded normal limits on political behavior.

On the surface, Trump and Moore couldn’t be more different. The president is a thrice-married former casino owner who let Howard Stern call his own daughter a “piece of ass.” Moore is a fundamentalist Southern Baptist who writes rhyming verse denouncing wanton sex. “Your children wander aimlessly poisoned by cocaine/Choosing to indulge their lusts, when God has said abstain,” he wrote in his sarcastically titled poem “America the Beautiful.” Trump described himself, during his campaign, as a “real friend” of the L.G.B.T. community, even if he hasn’t behaved like one in office. Moore has said that gay sex should be illegal.

But read the rest of “America the Beautiful,” and you start to see where Trump and Moore’s worldviews overlap. Both see a nation in apocalyptic decline, desperate for redemption. Whereas Trump spoke of “American carnage” in his dystopian inauguration speech, Moore calls the country a “moral slum” awaiting God’s judgment. Like the president, Moore is a conspiracy theorist who demonizes religious minorities; he once wrote that Keith Ellison, a Democrat from Minnesota, should not be allowed to serve in the House of Representatives because he is Muslim.

I met Moore over a decade ago, when I was researching my first book, “Kingdom Coming: The Rise of Christian Nationalism.” By then, Moore had been forced off the bench for refusing a federal judge’s order to remove a 2.6-ton Ten Commandments monument he’d installed in the state judicial building. This martyrdom made him a cult figure on the religious right. A group of retired military men had taken the monument on tour, holding over 150 viewings and rallies; at an event in Austin, Tex., one of them spoke bitterly to me about the outsized power of American Jews. (Moore would later be re-elected to his seat, only to be suspended for the rest of his term in 2016 for ordering judges not to comply with the Supreme Court decision overturning bans on gay marriage.)

In trying to understand the movement I was reporting on, I turned to scholars of authoritarianism and fascism. If their words seemed relevant then, they’re even more so now. Fritz Stern, a historian who fled Nazi Germany, described the “conservative revolution” that prefigured National Socialism: “The movement did embody a paradox: its followers sought to destroy the despised present in order to recapture an idealized past in an imaginary future.”