Roy Moore's spokeswoman Janet Porter got into tense exchanges with CNN's Anderson Cooper and Poppy Harlow. (Amber Ferguson/The Washington Post)

Republican Senate candidate Roy Moore holds a slight lead in next Tuesday’s election in the deep-red state of Alabama. Sen. Richard C. Shelby (R-Ala.) won reelection in the state last year by nearly 30 points; Moore leads in an average of recent polls by a little more than 2.

It’s certainly the case that the closeness of the race is a function of the accusations that have been leveled against Moore over the past month. A month ago Saturday, The Post revealed that Moore had pursued several high-school-age women while he was in his 30s and serving in the district attorney’s office in Etowah County during the late 1970s. What’s more, one woman, Leigh Corfman, told of being approached by Moore when she was only 14 and described him sexually touching her. After that report, several other women came forward with stories about Moore approaching them as teenagers or, in one case, attempting a sexual assault.

Those allegations have dominated the conversation around Moore since — obscuring another aspect to the race. Even before those allegations, Moore was underperforming against Democrat Doug Jones. During his 2012 election as chief justice of the state’s Supreme Court, he won by only 3.5 points during an election that saw Mitt Romney beat President Barack Obama by more than 20 — likely a function of his having been ousted from the same position several years before for ignoring a court order. (He would go on to be removed from the bench again after winning in 2012, again for failing to uphold federal law.)

Beyond that, though, Moore has a long track record of saying controversial or offensive things, many of which have resurfaced recently as he seeks the highest office of his political career.

In 1997, as a circuit court judge, Moore spoke out against evolution — and linked it to crime. CNN’s KFILE team uncovered the video.

“We have kids driving by, shooting each other, that they don’t even know each other,” Moore said. “They’re acting like animals because we’ve taught them they come from animals. They’re treating their fellow men with prejudice because we taught them they come from animals.”

In 2005, Moore was interviewed by journalist Bill Press. During that interview, he argued that homosexuality should be illegal.

“Homosexual conduct should be illegal, yes,” he told Press when asked about his views on a contemporaneous Supreme Court decision. At the time, nearly half the country agreed; his campaign has not clarified whether he still holds this position.

In 2006, writing for the conservative site WorldNetDaily, he argued that Rep. Keith Ellison (D-Minn.) should not be allowed to serve in the House because he is Muslim and would be sworn in on the Koran.

“In 1943, we would never have allowed a member of Congress to take their oath on ‘Mein Kampf,’ or someone in the 1950s to swear allegiance to the ‘Communist Manifesto,'” Moore wrote. “Congress has the authority and should act to prohibit Ellison from taking the congressional oath today!” Asked about this article in October, Moore appeared to stand by it.

A year ago, after Donald Trump’s election, Moore was asked at an event whether he believed that Obama was born in the United States.

“My personal belief is that he wasn’t,” Moore replied, “but that’s probably over and done in a few days, unless we get something else to come along.”

In August of this year, Moore was interviewed by the Guardian. CNN excerpted part of the discussion.

The interviewer noted that Ronald Reagan once said that the Soviet Union was the focus of evil in the modern world.

“You could say that very well about America, couldn’t you?” Moore replied.

“Do you think?” the interviewer replied.

“Well, we promote a lot of bad things,” Moore said. Asked for an example, Moore replied, “Like same-sex marriage.” It was Moore’s refusal to uphold the U.S. Supreme Court’s decision on same-sex marriage that led to his second ouster from Alabama’s court.

When the interviewer noted that Putin makes the same argument, Moore didn’t blink.

“Maybe Putin is right,” Moore replied. “Maybe he’s more akin to me than I know.”

In September, Moore held a rally in Florence, Ala. One of the members of the audience, an African American, asked Moore when he thought America was last great.

“I think it was great at the time when families were united — even though we had slavery — they cared for one another,” Moore replied, according to the Los Angeles Times. “Our families were strong, our country had a direction.”

When these comments resurfaced this week, many people noted that, in 2002, Republican Senate leader Trent Lott had made comments looking back favorably at the segregated South — which ended up costing him his position. Moore was looking back further, to a time before the Civil War, expressing that America was last great at a time when black people were enslaved.

At Moore’s rally in Florence, he made other racially insensitive comments.

“We were torn apart in the Civil War — brother against brother, North against South, party against party,” he said. “What changed?”

“Now we have blacks and whites fighting, reds and yellows fighting, Democrats and Republicans fighting, men and women fighting,” he continued. “What’s going to unite us? What’s going to bring us back together? A president? A Congress? No. It’s going to be God.”

He later defended the use of “reds and yellows” by saying that he was quoting a religious song.

All of that, plus those two ousters from the state Supreme Court, was on the record before the allegations against Moore. While many of those comments are outside the mainstream of political rhetoric in the United States, they may not be outside the mainstream in Alabama, where, one month ago Friday, Moore held a 6-point lead in the Senate race.

On Tuesday, he may very well be elected to the Senate.