PHOENIX (AP) — Democratic Sen. Mark Kelly won his bid for reelection Friday in the crucial swing state of Arizona, defeating Republican venture capitalist Blake Masters to put his party one victory away from clinching control of the chamber for the next two years of Joe Biden’s presidency.

With Vice President Kamala Harris’ tiebreaking vote, Democrats can retain control of the Senate by winning either the Nevada race, which remains too early to call, or next month’s runoff in Georgia. Republicans now must win both those races to take the majority.

The Arizona race is one of a handful of contests that Republicans targeted in their bid to take control of the 50-50 Senate. It was a test of the inroads that Kelly and other Democrats have made in a state once reliably dominated by the GOP. Kelly’s victory suggests Democratic success in Arizona was not an aberration during Donald Trump’s presidency.

The closely watched race for governor between Democrat Katie Hobbs and Republican Kari Lake was too early to call Friday night. In the secretary of state’s race, Democrat Adrian Fontes defeated Republican Mark Finchem, a top 2020 election denier.

Kelly, a former NASA astronaut who’s flown in space four times, is married to former U.S. Rep. Gabby Giffords, who inspired the nation with her recovery from a gunshot wound to the head during an assassination attempt in 2011 that killed six people and injured 13. Kelly and Giffords went on to co-found a gun safety advocacy group.

Kelly and Giffords were at an Elton John concert in Phoenix on Friday night when The Associated Press called the race, campaign spokesperson Sarah Guggenheimer said. Maricopa County reported a large batch of results that increased Kelly’s lead and made clear Masters could not make up the difference with the remaining ballots.

“It’s been one of the great honors of my life to serve as Arizona’s Senator,” Kelly said in a statement. “I’m humbled by the trust our state has placed in me to continue this work.”

Kelly’s victory in a 2020 special election spurred by the death of Republican Sen. John McCain gave Democrats both of Arizona’s Senate seats for the first time in 70 years. The shift was propelled by the state’s fast-changing demographics and the unpopularity of Trump.

Kelly’s 2022 campaign largely focused on his support for abortion rights, protecting Social Security, lowering drug prices and ensuring a stable water supply in the midst of a drought, which has curtailed Arizona’s cut of Colorado River water.

With President Joe Biden struggling with low approval ratings, Kelly distanced himself from the president, particularly on border security, and played down his Democratic affiliation amid angst about the state of the economy.

He also styled himself as an independent willing to buck his party, in the style of McCain.

Masters, an acolyte of billionaire tech investor Peter Thiel, tried to penetrate Kelly’s independent image, aligning him with Biden’s failure to secure the U.S.-Mexico border and tamp down on rampant inflation.

Masters endeared himself to many GOP primary voters with his penchant for provocation and contrarian thinking. He called for privatizing Social Security, took a hard-line stance against abortion and promoted a racist theory popular with white nationalists that Democrats are seeking to use immigration to replace white people in America.

But after emerging bruised from a contentious primary, Masters struggled to raise money and was put on the defense over his controversial positions.

He earned Trump’s endorsement after claiming “Trump won in 2020,” but under pressure during a debate last month, he acknowledged he hasn’t seen evidence the election was rigged. He later doubled down on the false claim that Trump won.

After the primary, he scrubbed some of his more controversial positions from his website, but it wasn’t enough for the moderate swing voters who decided the election.

___

Follow the AP’s coverage of the 2022 midterm elections at https://apnews.com/hub/2022-midterm-elections. And check out https://apnews.com/hub/explaining-the-elections to learn more about the issues and factors at play in the midterms.