JACKSON, Miss. — Sen. Cindy Hyde-Smith won a racially polarizing election here Tuesday night after never fully apologizing for comments in which she suggested she would be willing to sit in the front row at a public hanging.

Then on Wednesday, Senate Republicans moved to confirm a judicial nominee who, as an attorney, defended a North Carolina voter identification law deemed unconstitutional by a federal appeals court because it sought to “target African Americans with almost surgical precision.”

The back-to-back developments this week offer a stark illustration of the state of the Republican Party and racial politics.

Five years after the GOP produced a self-examination that called for reconciliation with minority voters, the party has grown increasingly tolerant of racially divisive politics, making its support base even whiter as potential minority voters and candidates are driven away.

The shift has been led by a president who in the final days of the Mississippi Senate race said the Democratic candidate, an African American who was born here to a well-known family, doesn’t “fit in.”

The approach has provided a measure of success where, in multiple races this year, black Democrats mobilized unusually high turnouts only to be defeated by white opponents who did the same among white voters. It has produced two vastly different American electorates that both parties are struggling to grapple with ahead of the 2020 presidential election.

While some have expressed concern that the party is becoming racially desensitized in a way that produces short-term gains but risks long-term peril, there is little evidence of institutional worry. Those most concerned about the direction of the party are out of office, out of favor — or, when it comes to matters of race, just outliers.

“We are not doing a very good job of avoiding the obvious potholes on race in America and we ought to be more sensitive when it comes to those issues,” said Sen. Tim Scott of South Carolina, the only black Republican in the Senate.

The GOP’s challenge came into focus earlier this week when Rep. Mia Love (R-Utah), the only black female Republican in Congress, delivered a scathing rebuke to her party during a concession speech after learning she had come up short in her reelection bid following a drawn-out process of vote counting.

She singled out Trump, who earlier mocked her when she was behind in the vote by saying “Mia Love gave me no love, and she lost.”

“This election experience and these comments shines a spotlight on the problems Washington politicians have with minorities and black Americans — it’s transactional. It’s not personal,” Love said. “We feel like politicians claim they know what’s best for us from a safe distance, yet they’re never willing to take us home.”

“Because Republicans never take minority communities into their home and citizens into their homes and into their hearts, they stay with Democrats and bureaucrats in Washington,” she added.

Not long ago, before Trump upended the party with race-based attacks on immigrants and minority groups, many Republican leaders concluded that changing demographics in the country required that the party diversify its base.

In 2005, Ken Mehlman, the Republican National Committee chairman at the time, delivered a speech apologizing for a past pattern of exploiting racial division in the South. “We were wrong,” Mehlman said then.

After Mitt Romney lost to President Barack Obama in 2012, the party conducted its autopsy, concluding that it should have a presence on historically black college campuses, work with the NAACP and recruit black candidates and surrogates.

Senate Majority Leader Mitch McConnell (R-Ky.) has recently played down the notion that Republicans have much opportunity to win a greater share of black voters.

“I think we can improve our position with women voters and with Hispanic voters for sure,” he said in an October interview with NPR. “With African Americans, we haven’t been able to make much headway, although I think it is noteworthy that Tim Scott is a member of our conference.”

Scott has repeatedly found himself in the position of trying to guide his party on issues of race.

But on Wednesday he provided a crucial vote to help advance the confirmation of Thomas Farr, the attorney who defended the North Carolina voter ID law.

Scott was the last senator to vote, eventually voting in favor and putting the tally at 50 to 50, which allowed Vice President Pence to break the tie in favor of Republicans.

After the procedural vote, Scott expressed frustration with the nomination and declined to say whether he will support Farr on the final confirmation vote, casting the nomination as one of the things his party needs to address before it can connect with black voters.

“There’s a lot of folks that could be judges in states throughout the nation, including North Carolina, besides Tom Farr,” he said.

Few incidents illuminated that racial divide more than the Senate election in Mississippi. In the state’s 82 counties, Democrat Mike Espy won all 25 that have a majority of black residents, while Hyde-Smith won all but two that have a majority of white residents.

Hyde-Smith suffered little political consequence for her remark that she would sit with a supporter in the front row of a public hanging, which evoked Mississippi’s dark history of racism and public lynchings. No prominent Republican rebuked her publicly for the comment, even as several major corporations — including Walmart, Google, and Boston Scientific — asked the Hyde-Smith campaign to return their contributions.

It was a striking contrast to 2002, when Sen. Trent Lott was forced out of his leadership position for praising Sen. Strom Thurmond (R-S.C.), who ran for president in 1948 on a segregationist platform. Lott apologized days later for his comment, saying he never meant to suggest that he “embraced the discarded policies of the past.”

“If you are from the South, there is no good way. If you respond too quickly you keep the story alive and if you don’t respond quick enough you get criticized,” Lott said in an interview of dealing with racially sensitive controversies. “We are just held to a higher standard because we are from the South.”

Now a lobbyist, Lott said it is important for the Republican Party to continue its outreach to black voters, though he also said his state deserved credit for electing its first female senator over the state’s first black senator since the 1880s. “In Mississippi, we were going to create history either way,” he said. “Give us some credit here.”

Democrats saw Trump’s last-minute swing as beneficial to Hyde-Smith, and several speculated that the controversy of her “public hanging” comment may have helped her as well.

“Anything that makes people go to their corners in red states benefits Republicans, and I think it did make people go to their corners,” said Joe Trippi, a consultant for the Espy campaign.

But he said the long-term trends reflected in the midterm elections in the South suggested that Republican advantages would continue to erode.

“The path the Republican Party is on is actually turning off some of their own party,” said Trippi, who also worked on the successful 2017 campaign of Sen. Doug Jones (D-Ala.). “They are starting to really lose a lot of suburban voters and they are not picking up enough in increase in their rural base to make up for that loss.”

Still, as Hyde-Smith took the stage at her victory party Tuesday night, Republicans felt emboldened and aggrieved, touting how they overcame what they considered repeatedly unfair character attacks.

“I’ve never seen anybody attacked, anybody fired at as hard as this great lady was. She stood in the crucible. And she won,” Mississippi Gov. Phil Bryant (R) said.

Hyde-Smith said she had no regrets about her campaign, and sought to move on without ever directly reaching out to black voters who make up nearly 40 percent of the electorate here.

“I’m a cowgirl and when a cowgirl references western movies that I’ve seen hundreds of, and somebody twists it, that’s just it,” she told reporters. “You’ve got to roll with the punches.”

With that, she headed out a side door. She had an early-morning flight to catch to get to Washington, where she would later vote to confirm Farr.

Scherer reported from Washington. Sean Sullivan and Seung Min Kim in Washington contributed to this report.