Updated

Republicans will hold onto the governor's office in swing state New Hampshire in what turned into the most highly contested gubernatorial election this year, a showdown that grabbed tons of national attention and outside money.

The Fox News Decision Desk projects that former Sen. Kelly Ayotte, the Republican nominee, will defeat Democratic nominee and former Mayor Joyce Craig of Manchester, New Hampshire's largest city.

Ayotte will succeed popular GOP Gov. Chris Sununu, who decided against running for re-election after winning and serving four straight two-year terms as governor. [New Hampshire and neighboring Vermont are the only states in the U.S. that elect governors every two years.]

"Thank you, New Hampshire! Ready to hit the ground running to keep our wonderful state safe, prosperous and free. Let’s get to work!," Ayotte wrote in a social media post after her race was called.

Ayotte, a former state attorney general who was elected to the U.S. Senate in 2010 before narrowly losing re-election six years later, easily defeated a crowded field of rivals in early September to win the GOP nomination, while Craig edged out Executive Councilor Cinde Warmington to capture the Democratic nomination.

CLICK HERE FOR THE LATEST FOX NEWS 2024 ELECTION RESULTS

Kelly Ayotte defends her conservative credentials in the GOP nomination race for New Hampshire governor

Former Sen. Kelly Ayotte, a Republican candidate for governor, is surrounded by supporters as she files her candidacy at the Secretary of State's office, on June 13, 2024 in Concord, N.H. (Fox News - Paul Steinhauser)

While New Hampshire traditionally holds the first-in-the-nation presidential primary, its state primary is one of the latest on the electoral calendar, which sets up a mad rush to the general election.

National Democrats spent heavily in the race, pouring in millions to target Ayotte for her Senate votes a decade ago on abortion, and for her support this year for former President Trump, whom she had disavowed in her 2016 election defeat.

Ayotte and her GOP allies also spent heavily targeting Craig over crime and homelessness during her tenure steering Manchester, which is New Hampshire's largest city.

And pointing to neighboring Massachusetts, where Democrats control the state government and dominate the congressional delegation, Ayotte made her slogan "Don't Mass UP NH" her campaign's rallying cry.

Former Manchester Mayor Joyce Craig, the Democratic gubernatorial nominee in New Hampshire, speaks with voters in Concord, N.H., Oct. 6.

Former Manchester Mayor Joyce Craig, the Democratic gubernatorial nominee in New Hampshire, speaks with voters in Concord, N.H., Oct. 6. (Joyce Craig gubernatorial campaign )

Ayotte was a rising star in the Republican Party in 2016 with a burgeoning profile on national security.

But just ahead of the 2016 election, she withdrew her support for Trump over the "Access Hollywood" controversy, in which Trump in a years-old video made extremely crude comments about grabbing women without their consent.

"I cannot and will not support a candidate for president who brags about degrading and assaulting women," Ayotte said at the time. 

Ayotte lost re-election by a razor-thin margin of just over 1,000 votes at the hands of then-Democratic Gov. Maggie Hassan.

But Ayotte slightly outperformed Trump in New Hampshire, as Democratic presidential nominee Hillary Clinton edged the White House winner by less than 3,000 votes.

Before retiring full time to New Hampshire, Ayotte stuck around Washington briefly after the end of her term, shepherding then-Supreme Court nominee Neil Gorsuch (Trump's first high court nominee) through his successful Senate confirmation process.

In her post-Senate career, Ayotte enjoyed a lucrative period as she served on corporate boards and in advisory roles at both public and private companies. Among them was News Corp., which at one time was the parent company of Fox News.

Former Sen. Kelly Ayotte is the front-runner for the GOP gubernatorial nomination in New Hampshire

Former Sen. Kelly Ayotte, the Republican gubernatorial nominee in New Hampshire, speaks with voters at the Hampton Beach Seafood Festival. (Kelly Ayotte campaign)

Ayotte during the intervening years also kept a close eye on New Hampshire politics, and would occasionally appear at Republican Party events in the state. She also continued to write opinion pieces on major state, national and international issues.

CLICK HERE TO GET THE FOX NEWS APP

Ayotte announced her gubernatorial bid last year, after Sununu announced that he wouldn't seek re-election in 2024.

Ayotte stayed neutral in New Hampshire's first-in-the-nation presidential primary, but she endorsed Trump in early March, right after he clinched the GOP nomination.

He’ll fix the disaster over the southern border, and we’re also seeing it on the northern border, to keep the country safe," Ayotte told Fox News Digital in a June interview.

Ayotte's main opponent in the GOP primary, former state Senate President Chuck Morse, touted his support for Trump and spotlighted Ayotte's past criticism of the former president.

But Trump stayed neutral in the New Hampshire Senate primary, as Ayotte crushed Morse and the rest of the GOP field.

The former president, far behind in the polls in the Granite State, also steered clear of the state in the general election and placed only the bare minimum of resources in New Hampshire. 

That meant that Ayotte, other than the strong support she received from the Republican Governors Association, was mostly on her own as she battled Craig in the general election.

Get the latest updates from the 2024 campaign trail, exclusive interviews and more at our Fox News Digital election hub.