Democrat Kyrsten Sinema is the apparent winner of Arizona Senate race, according to NBC News.
Republican Martha McSally conceded defeat, bringing an end to the long-fought battle over the seat held by retiring GOP Sen. Jeff Flake.
While most of the hundreds of midterm races produced clear winners and losers by Tuesday night, NBC News still considered the Arizona contest too close to call until Monday night. Sinema eventually developed a lead that grew as days wore on.
She is the first woman ever elected to the U.S. Senate from the state of Arizona and the first Democrat that the state elected to the Senate in 30 years.
As the votes trickled in, Republicans launched a lawsuit challenging a mail-in ballot-counting practice in two Arizona counties that allowed voters to fix issues for up to five days after Election Day.
The tug-of-war over the remaining ballots came amid another roiling in controversy over vote totals in Broward County, Florida. President Donald Trump weighed in on both races in tweets Friday.
The Sinema-McSally race was widely viewed as one of the Democrats' best opportunities to gain seats in an unfavorable Senate election map. Democrats were defending 26 Senate seats in the midterms, while Republicans were defending nine.
And with Flake, an outspoken Trump critic, choosing not to run for re-election, Republicans lost the incumbent advantage that might otherwise have shielded them from a serious Democratic challenge.
Instead, analysts forecasted a neck-and-neck race that appeared to break in Sinema's favor in the final days before the election, according to an NBC News/Marist poll. Analyses from RealClearPolitics and Sabato's Crystal Ball called the race a toss-up, while FiveThirtyEight gave Sinema a slight edge.
Sinema, who tried to run as a moderate, came under fire in October after Republican and conservative organizations released video clips of the Democrat from years earlier appearing to make fun of her state and its residents.