Democratic Rep. Kyrsten Sinema defeated Republican Rep. Martha McSally late Monday in a Senate race in Arizona, flipping a seat that had been under GOP control for 24 years.

Sinema, 42, beat McSally by approximately 38,000 votes, or a 1.7% margin. She will be now the first woman to represent Arizona in the U.S. Senate, and the first Democratic senator from the state since 1976. Sinema is also the first openly bisexual U.S. Senator, and will replace retiring Republican Sen. Jeff Flake.

McSally, 52, conceded the race Monday evening by sharing a video on Twitter.

“I just called Kyrsten Sinema and congratulated her on becoming Arizona’s first female senator after a hard-fought battle,” McSally says in the video as she sits beside her dog on a couch, presumably at her home. “I wish her all success as she represents Arizona in the Senate.”

SLIDESHOW: DONALD TRUMP’S 30 CRAZIEST TWEETS

With Sinema’s victory, Democrats now hold 47 Senate seats, while Republicans have 51 seats. Florida’s Senate race between GOP Gov. Rick Scott and Sen. Bill Nelson is still facing a recount, while Mississippi’s Senate race between Republican Sen. Cindy Hyde-Smith and Democrat Mike Epsy is headed for a runoff at the end of the month.

President Donald Trump has accused Arizona’s election officials in recent days — in both tweets and comments to reporters — of being corrupt and incorrectly counting votes. According to CNN, approximately three-fourths of Arizona’s ballots are cast via mail. State law also requires ballots to be sealed and signed.

Sinema reportedly began her political career as an activist and Green Party spokeswoman. Recently, she has been criticized by some Democratic officials for taking Trump and Republicans’ side on certain types of legislation.