Image copyright EPA Image caption Kyrsten Sinema now becomes Arizona's first female senator

The US state of Arizona has elected its first female senator, after Democrat Kyrsten Sinema beat Republican Martha McSally in a tight race.

Ms Sinema is the south-western state's first Democratic senator since 1994.

The win narrows the Republican majority to four seats (51-47), with two more Senate races remaining unresolved.

In Florida, a recount has been ordered by law after unofficial results fell within a 0.5% margin. Mississippi will hold a run-off vote later this month.

What happened in Arizona?

With almost all the votes counted, Ms Sinema had a lead of 1.7% over her rival. She takes the seat vacated by Jeff Flake, a frequent critic of Mr Trump.

Ms Sinema, 42, later addressed her cheering supporters in Scottsdale, near Phoenix, speaking of the urgent need to heal the bitter political rancour dividing Americans.

She paid tribute to the memory of the late John McCain, who also represented Arizona in the Senate until his death earlier this year, saying he had set a shining example of how to put national interests above party political ones.

"Senator McCain is irreplaceable," she said, "but his example will guide our next steps forward. He taught us to always assume the best in others, to seek compromise instead of sowing division, and to always put country ahead of party."

Republican Ms McSally, a 52-year-old former combat fighter pilot, conceded defeat.

In a video message posted on Twitter, she said: "I just called Kyrsten Sinema and congratulated her on becoming Arizona's first female senator after a hard-fought battle."

Who is Kyrsten Sinema?

42 years old, born in Tucson, Arizona

Faced homelessness and poverty as a child

Former social worker who became a lawyer

Entered politics as a Green Party candidate

Elected to House of Representatives as a Democrat in 2012

Openly bisexual, she has campaigned for same-sex marriage

Read more on women's mid-term gains:

More women than ever before won seats in Congress in the 2018 mid-terms.

What does it mean for Congress - and America?

Which other races are still undecided?

Votes are being recounted in the Florida senate race, which pits incumbent Democrat Bill Nelson against the state's Republican Governor Rick Scott.

Florida Secretary of State Ken Detzner has ordered that all 67 of the state's counties complete machine recounts for the Senate by 15:00 local time (20:00 GMT) on Thursday.

In Georgia's gubernatorial election, Democrat Stacey Abrams is refusing to concede in her race against Republican Brian Kemp.

Mr Kemp declared victory on Wednesday with a narrow lead but campaign officials for Ms Abrams have started a legal challenge to ensure all votes are counted.

Image copyright Getty Images Image caption Stacey Abrams has not yet conceded in Georgia

Her supporters have claimed that issues such as ballot machines supplied without power cables and four-hour queues unfairly helped Mr Kemp.

An ongoing tally has whittled Mr Kemp's lead slightly to under 60,000 votes, the Atlanta Journal-Constitution reported on Sunday.

But Ms Abrams still needs another 22,000 votes to trigger a run-off election next month, and it is unclear how many ballots remain outstanding.

Meanwhile, in Mississippi, Republican Cindy Hyde-Smith faces Democrat Mike Espy in a run-off vote after neither managed to reach 50% in the first round, winning 41.5% and 40.6% respectively.

The vote will take place on 27 November.

Anthony Zurcher, BBC News, Washington

Last Wednesday Donald Trump boasted that Republicans could end up with one of the party's largest Senate majorities in the last 100 years. A week and two Democratic victories later, and those hopes have been dashed.

Pending the outcome of the Florida recount and a Mississippi run-off, Republicans are up only one seat in the Senate. Given that Democrats were defending 10 incumbents in states Mr Trump won in 2016, the results for Republicans reveal an enormous missed opportunity.

The raw numbers don't tell the whole story. Last week there were Senate contests in eight key presidential battleground states - Arizona, Nevada, Wisconsin, Michigan, Ohio, Pennsylvania, Florida and Virginia. Democrats have won every one except Florida.

And the significance of the Arizona victory is also notable. Of the five seats that have changed hands, Arizona is the only one that flipped away from the party that carried it in 2016.

Time will tell whether the 2018 results indicate a new baseline for Democrats or a high-water mark. By limiting the damage in what could have been a devastating election for its Senate contingent, however, the party is much better positioned to challenge for control of the chamber in the coming years.