That a Republican candidate for Senate in Alabama would cruise to victory seemed almost a foregone conclusion. But after a series of women came forward to accuse that candidate, Roy S. Moore, of sexual misconduct, less is certain in an unlikely nail-biter of a race that could have major implications for the party’s ability to govern in Washington.

President Trump has gone from largely avoiding mention of Mr. Moore, a former chief justice of the Alabama Supreme Court, to unequivocally endorsing him. Many Senate Republicans distanced themselves from the candidate, and some called on him to withdraw from the race.

Democrats, for their part, are contemplating the near-impossible: flipping a seat in a deeply red state that last elected a Democratic senator in 1992.

As voters prepare for the special election on Tuesday, here is a breakdown of The New York Times’s coverage on the race since the accusations emerged.

What are the allegations?

On Nov. 9, The Washington Post reported that four women said Mr. Moore had pursued them sexually or romantically when they were 18 or younger and he was in his 30s. One of them said that he touched her sexually when she was 14, below the state’s age of consent.

Mr. Moore, 70, remains defiant, trying to discredit the accusers while denying the most serious charges against him — though he has not denied that when he was in his 30s, he dated women in their teens. He has claimed that his accusers are part of a conspiracy against him, and that he is opposed by “the forces of evil who are attempting to relegate our conservative Christian values to the dustbin of history.”

On Nov. 27, The Post reported that a woman working for a conservative group had attempted to trick the newspaper into publishing false allegations against Mr. Moore, apparently in hopes of damaging The Post’s credibility.

On Friday, one of Mr. Moore’s accusers, Beverly Young Nelson, said she added a note to an inscription in her high school yearbook that she says was written by Mr. Moore.

How have Republicans reacted?

At first, President Trump remained largely silent, but he then began defending Mr. Moore and saying that voters should reject Doug Jones, the Democrat in the race. After he formally endorsed Mr. Moore on Dec. 4, the Republican National Committee restored its financial support.

Video

At first, President Trump remained largely silent. But as the election neared, he supported Roy S. Moore for the Alabama Senate seat.Published OnDec. 11, 2017CreditImage by Audra Melton for The New York Times

On Friday, Mr. Trump held a political rally in Pensacola, Fla., less than 30 miles from the Alabama border, and urged Alabamians to vote for Mr. Moore.

“We need somebody in that Senate seat who will vote for our Make America Great Again agenda,” Mr. Trump said.

The dean of the state’s congressional delegation, the Republican Senator Richard C. Shelby, excoriated Mr. Moore in a rare national television appearance on Sunday, telling CNN that Alabama “deserves better.”

Roy S. Moore, the Senate candidate from Alabama, and his supporters are trying to discredit and diminish the mounting sexual misconduct allegations against him.Published OnNov. 14, 2017CreditImage by Drew Angerer/Getty Images

Senator Mitch McConnell of Kentucky, the Republican majority leader — who has said “I believe the women” and took the stand for weeks that Mr. Moore should drop out of the race — said last week that the race was for the people of Alabama to decide.

Mr. McConnell’s colleagues have discussed the possibility that, if Mr. Moore is elected, he could be subjected to an ethics investigation, or even expelled from the Senate.

In a tight race, any votes cast for a little-known write-in candidate, Lee Busby, might affect the outcome.

What do voters think?

Mr. Moore’s solid lead in voter surveys evaporated just after the scandal broke, but his poll numbers later edged upward again. Conflicting polls have highlighted how difficult it is to predict an unusual December election.

Standing in Mr. Jones’s way, our Alabama team reported, is the deeply negative view of Democrats that is held even by many Alabamians who dislike Mr. Moore.

Though polls indicate about half of voters think the accusations against Mr. Moore are not the most important issue in the race, policy questions have largely been ignored.

Nate Cohn, an elections analyst for The Upshot, took a look at how Mr. Jones might fare, and how the race tests the limits of party loyalty in what might be the most Republican state in the country. You can check out the latest polls on the race at RealClearPolitics.