Republican Cindy Hyde-Smith won the racist senatorial elections in Mississippi, defeating black Democrat Mike Espy.
It brings to 53 the majority in the Senate of the party of President Donald Trump, against 47 to the Democratic party.
The race narrowed after Ms. Hyde-Smith, who is white, was registered, saying she would attend a public hanging with pleasure.
The comments evoked the lynching of African-Americans in a state marked by a history of racial violence.
With nearly all votes counted, Ms. Hyde-Smith had garnered 53.9% of the vote in the Republican state, compared to 46.1% for Mr. Espy.
President Trump tweeted his congratulations.
In a statement, Ms. Hyde-Smith said, "I want everyone to know, no matter who you voted for today, I will represent every Mississippian."
Yielding to his opponent, Mr. Espy tweeted that he was "proud of the historic campaign we conducted and grateful for his support".
The second-round election campaign had absorbed aspects of the horrific past of the state of Deep South.
On Monday, several flowing nodes were discovered in the Mississippi capital of Jackson, apparently to protest the content of the campaign.
Signs alongside the ropes urged voters to elect "someone who respects the lives of the lynch mob victims" and "remind people that times have not changed," according to local media reports.
This election became more competitive after a video broadcast earlier this month of Ms. Hyde-Smith – who is the sitting Senator – saying she would be "in the front row" if one of her supporters took a public hanging.
For many, the comment evoked past lynchings of African-Americans.
Comments have become a unifying call
Analysis of Chris Buckler, BBC News, Mississippi
Many have said that it was the election of Cindy Hyde-Smyth to lose – and some would say that she seemed to do her best.
Joking about a public hanging in a state with a history of racially motivated lynchings was not just insensitive, it was a rallying call for the naysayers.
A number of companies even asked him to recover their donations.
Apologies were finally made, but by then, the remarks had overshadowed Senator Hyde-Smith's campaign, and everywhere she was confronted with questions about racial division rather than the race for the election. .
Nevertheless, she can console herself knowing that it was a decisive victory.
President Trump, who congratulated him on the result, will also congratulate himself. He undoubtedly helped to motivate his supporters at rallies on the eve of the Mississippi elections.
Yet the Democrats and their candidate Mike Espy may well claim some kind of moral victory. In a state widely regarded as a Republican fortress, they made this election a real fight.
In his admission statement, Mr. Espy pointed out that the future of Mississippi would be more promising than its past.
According to the National Association for the Advancement of People of Color (NAACP), Mississippi recorded the highest number of lynchings in the country between 1882 and 1968.
Mr. Espy condemned his rival's comment as "reprehensible"; Ms. Hyde-Smith asserted that there was no "negative connotation".
The Democrat himself was scrutinized for his work as a lobbyist in Côte d 'Ivoire in 2011, whose former despot, Laurent Gbagbo, is currently being tried by the International Criminal Court.
Mr Espy was Secretary of Agriculture for President Bill Clinton, but resigned under a cloud of allegations of corruption, on which he was later acquitted.
Meanwhile, Ms. Hyde-Smith was also criticized when pictures of her pose at the home of Confederate President Jefferson Davis were unveiled under the title: "The Mississippi Story at Its Best".
A video of Ms. Hyde-Smith – who was the first-ever member of the US Congress of Mississippi – apparently encouraging repression of voters has also appeared on Twitter.
This recording showed the senator saying that there were liberals "who may not want to vote – maybe we want to make it a bit more difficult [to vote]".
His campaign later revealed that the comment was a joke and that the video had been "selectively altered," the Washington Post reported.
In a recent debate, Ms. Hyde-Smith apologized legitimately to anyone who had been offended, adding that her opponents had "twisted" her words "as a political weapon."
President Donald Trump traveled to Mississippi on the eve of the vote to campaign for Mrs. Hyde-Smith.
"I know her and I know she's apologized and she's misquoted," Republican President told reporters during his trip to the state.
He described Mr. Espy as an ideologue of the far left who "would prefer to protect illegal aliens than the inhabitants of Mississippi," and questioned his compatibility with the Mississippi.
If he had won, Mr. Espy would have become the first black senator of Mississippi since the era of reconstruction following the American Civil War.
Mr. Espy's campaign had pushed the idea that the election of Mrs. Hyde-Smith would reinforce a persistent view of Mississippi as a racist state of the south.
"We can not afford a senator who embarrasses us and reinforces the stereotypes for which we have worked so hard," said an announcement for the Democratic party.
Mr Espy was to win an overwhelming majority of black votes and a considerable number of white voters to overthrow his Republican opponent.
- Mid-term US election results: maps, graphs and analysis
- The lessons that American Democrats can learn for 2020
Why was the election still unresolved?
Following the resignation of Republican Senator Thad Cochran in April, a special election for the US Senate seat in Mississippi was held.
Under state law, if no candidate wins more than 50% of the votes, a second round must take place.
On November 6, during the mid-term elections, Ms. Hyde-Smith and Mr. Espy won about 41% of the vote.