Mississippi Sen. Cindy Hyde-Smith (R.) defeated Democratic challenger Mike Espy on Tuesday in a runoff Senate election to become the first woman ever elected to Congress in the state.

The Associated Press called the race for Hyde-Smith at 10:24 p.m. ET. Espy, a former congressman and secretary of agriculture, was trying to become the first African-American senator elected in Mississippi since Reconstruction.

Hyde-Smith was the heavy favorite in Mississippi, which President Donald Trump won by 18 points in 2016 and hasn't elected a Democratic senator in decades.

"Mississippi was one of the last two states to have never elected a woman to Congress," said Debbie Walsh, director of the Center for American Women and Politics at Rutgers University, according to USA Today. "While Cindy Hyde-Smith got Mississippi out of that undistinguished club when she was appointed, there still had never been a woman elected, so this is another milestone for the state of Mississippi."

The victory of Hyde-Smith, who was appointed to fill the seat of Sen. Thad Cochran (R., Miss.) in April after he resigned for health reasons, solidifies a 53-47 Senate majority for the Republicans in the new Congress. Democrats took control of the House in the midterms, leaving Trump with a divided Congress heading into the next two years of his presidency.

Trump, who campaigned for Hyde-Smith, tweeted his congratulations to her shortly after the race was called.

Congratulations to Senator Cindy Hyde-Smith on your big WIN in the Great State of Mississippi. We are all very proud of you! — Donald J. Trump (@realDonaldTrump) November 28, 2018

There will be a record 24 women in the U.S. Senate starting in January, 17 of them Democrats.

The race was marked by national attention directed at Hyde-Smith's remark this month complimenting a cattle rancher by saying, "If he invited me to a public hanging, I'd be on the front row." She apologized to anyone who took offense, although she said she meant nothing untoward by the remark, which was construed by Espy and others as racially insensitive given Mississippi's history of lynchings.

MSNBC guest Michael Eric Dyson blasted her as a "racist" and "white supremacist" on Tuesday. Opponents of Hyde-Smith hung nooses and left signs near the Mississippi Capitol to protest her comments.