Roy Moore’s spokeswoman had a nasty name for reporters covering the Alabama Senate race: “The lynch-mob media.”

Stephen Bannon, the president’s deposed Svengali, slammed them as the “opposition party.”

And Moore’s wife — among many others — used the most familiar insult of all: “Fake news.”

This relentless disparagement was as ugly as it was anti-democratic. And on Tuesday, it failed.

Enough voters decided that they believed the highly credible accusations against Moore. They voted their consciences, and in some cases went against their own voting histories, putting a Democrat in office in ruby-red Alabama.

What did it mean?

“There are standards. There are limits,” was how Jake Tapper put it minutes after CNN called the race for Democrat Doug Jones.

He was talking about voters’ reactions to the harrowing stories of sexual misconduct that four women told The Washington Post in mid-November — that Moore, as a man in his 30s, had preyed on teenage girls and, in one case, molested a 14-year-old, Leigh Corfman.

Moore tried to brand the women as liars, saying he didn’t even know them. And he tried to portray the reality-based press as nothing but a political tool. His media-bashing included not only The Post, which led in the coverage, but other national outlets along with papers in Alabama that took a risk by endorsing Jones, and that added their own original reporting.

So many of Moore’s moves over the past weeks seemed oddly familiar. And for good reason — they were right out of President Donald Trump’s campaign playbook. Moore threatened to sue the Alabama Media Group, just as Trump threatened the New York Times.

“The Washington Post ruled this race,” wrote Harry Enten on the FiveThirtyEight.com blog Tuesday night. “Not only did their reporting turn this race around, but their poll had Jones up 3 percentage points. That was by far one of the most accurate polls.”

For a while, it seemed that the Moore campaign’s efforts — under the tutelage of Bannon and with the constant backing of his propagandizing Breitbart News — would prevail.

Campaign staffers were instructed to criticize mainstream media reports, to call them fake and to direct voters to get their information from reliably pro-Moore sites, especially Breitbart, according to a document obtained by Vox.

“We have prepared a primer that lists the ‘fake news’ put out by four women followed by some of the evidence and responses that has been uncovered and that show the claims to be entirely false,” it read.

This intense effort seemed to take hold: By last weekend, according to a CBS poll, 71 percent of Republican voters said they didn’t believe the accusations against Moore. Nine in 10 of these blamed the media for making up lies. And plenty of those voters came out for Moore.

But others couldn’t bring themselves to cast a vote for a man who — long before the misconduct charges — had disgraced the state by being removed twice from the Alabama Supreme Court for not upholding the law. Others found enough enthusiasm for Jones to come out strong for him.

This is an encouraging moment. What amounted to a test case for relying on the “fake news” technique failed in Alabama. Even more heartening is that the women who had the courage to come forward and tell their stories were vindicated.

And their truths prevailed.

Margaret Sullivan is The Washington Post’s media columnist.