TALLAHASSEE — When Nicole "Nikki" Fried went to sleep on Tuesday, Nov. 6, the candidate for agriculture commissioner was behind her opponent, state Rep. Matt Caldwell by half of 1 percent.

She didn't see the bump in votes she expected from Broward, her home county, and she had a gut feeling that the numbers weren't right.

"For the next 24 hours, we saw that was the case," she said in an interview Saturday. "Democracy doesn't happen overnight.

As thousands of late ballots were tallied, particularly in Broward and Palm Beach counties, the closest of the statewide races to go into a recount flipped a day after the polls closed. She maintained a slim but decisive margin thereafter.

After grueling machine and manual recounts for the razor-thin race, Fried emerged victorious in the contest to replace term-limited Adam Putnam by just 6,753 votes — a margin of 0.08 percent. Caldwell asked a Broward judge Saturday to mandate the county to submit machine recount results to the state, which would give Republicans a net increase. That petition was denied, according to Broward County attorney Andrew Meyers.

That left one statewide Democratic candidate standing: Fried, a South Florida attorney whose first run for office catapulted her into a unique position.

Democrats' candidates for chief financial officer and attorney general lost by significant margins. After a machine recount confirmed Ron DeSantis' election, Tallahassee mayor and gubernatorial candidate Andrew Gillum conceded in a speech on Facebook live Saturday afternoon. U.S. Sen. Bill Nelson's campaign scheduled a 3 p.m. statement Sunday after the state's official results showed Gov. Rick Scott with a margin of 10,033 votes (0.12 percent) after a long week of lawsuits and dashed hopes to change election provisions.

Fried is not just the winner of the cabinet seat, but she also is now the highest-ranking Democrat in the state and the first woman elected to the job.

How, of all people, did the first-time candidate from South Florida rise above the rest of her party's high-profile candidates? There was a three-term U.S. Senator, the son of a legendary state Supreme Court justice and charismatic mayor of the capital city? What was her key to a down-to-the-wire success?

She says her campaign's success was three-fold.

First, she committed to a mostly nonpartisan campaign.

Second, she stuck firmly to three narrow talking points, or her "three w's": Weapons, weed and water.

Fried's campaign, which was heavily predicated on gun control and expanding access to medical marijuana, brought an understanding of the agriculture commissioner's role to those outside of the farming community. Or, in other words — Democrats, suburbanites and urban dwellers.

"These were things that transcend Democrats, independents and Republicans," Fried said of her platform. "I made them believe that I want to fix things and make things better."

The third key to her success? The "fourth w," she said: Being a woman.

Fried, who sees herself as a role model for her young niece, Ella, said "people cross party lines because they believe it's time to let some women into office."

Steve Schale, a Democratic strategist and consultant who did not work directly for the campaign, agreed that Fried's gender likely played a role. He speculated that her gender elevated her name off a majority male ticket, playing into a nationwide trend this election.

"You look around the country, and Democratic women had a really good night," he said. "There's a profile that did very well. It was women."

Schale said Fried's smartest move was playing in the narrow lane, especially leaning into gun issues provoked by last year's mass shooting at Marjory Stoneman Douglas High School and the discovery of a breach in background checks that happened under the supervision of Putnam.

She spent time publicly distancing herself from the National Rifle Association, gaining attention from parents of Parkland victims and groups like Moms Demand Action. Caldwell, on the other hand, was endorsed by the NRA and campaigned on a promise to defend the Second Amendment at all costs.

"She was smart to lean into narrow lanes," said Schale, who led former President Barack Obama's efforts in Florida, "For her, it was a really solid contrast with Matt."

One thing Fried didn't have when she started out was much name recognition. Her opponent, Caldwell, had nearly a decade of experience in public office. So Fried worked to travel and speak as often as she could.

Schale said if you were to walk into a grocery store and ask people who Nikki Fried was, "they would think you're asking about their neighbors."

But when she made national news after her campaign bank accounts were shut down twice because of medical marijuana industry donors, high-profile endorsements, donations and speaking engagements started to come through.

In September, Congressman and former governor Charlie Crist said the state was desperate for "more leaders like Nikki." Former Vice President Joe Biden endorsed her in October. Big names like former New York Mayor Michael Bloomberg's Everytown for Gun Safety came through with huge donations.

While she had big donors, Fried didn't have the sugar and weapon industries behind her. In fact, she raised about $3.5 million less than Caldwell in the end. She didn't have history on her side, either. Republicans had won 13 of the last 14 Cabinet races, most by large margins.

Caldwell fashioned himself into the agriculture candidate Florida has seen time and time again. He ditched his signature bow tie for a cowboy hat, his dress shoes for brown leather boots, and he toured the state in a modest pickup truck with a small but mighty campaign staff.

The makeover seemed to have worked. But then it didn't. On election night, he won by a slim half point. At the end of the manual recount, that lead had long vanished and his deficit exceeded 6,700 votes.

The recount was not an easy one for either candidate. Caldwell, who trailed by 5,307 votes heading into the manual recount, sued Broward's elections supervisor after more than 2,000 ballots were misplaced during its machine recount. As a result, the county's canvassing board submitted a combined version of its manual recount totals and original unofficial totals. That decision put Caldwell further behind Fried.

Palm Beach County, which faced a multitude of recount-related problems, never even started its manual recount for the agriculture commissioner's race.

On Saturday night, the attorneys at the Broward election office took a group photo: "Say Senator Scott!" one blurted out. "Commissioner Fried!" said Matt Gotha, one of her consultants.

Then, the happy attorneys shouted: "Everybody gets something!"

Alex Sink, former CFO and the last Democrat to hold a cabinet position, called the overall Democrat losses "demoralizing." She said Fried's role in the cabinet is "very, very important" to offer balance among top state leaders.

Fried's transition team, which she prematurely announced Nov. 10, will be led by former U.S. Rep. Patrick Murphy, who represented the large agriculture community of Martin County. Also on the team is U.S. Rep. Darren Soto and Fred Guttenberg, a gun-control activist whose daughter, Jaime, was murdered at Marjory Stoneman Douglas High School last February.

After the machine recount ended Thursday, Fried declared victory again.

But on Nov, 17, a more muted Fried said the victorious announcements didn't necessarily reflect how she felt throughout the campaign.

When she first decided to run, she obviously wanted to win, she said. But just the process of running for office and bringing up issues she felt were important were a part of making history nonetheless.

"The reasons why I was doing this is what got me up every day," she said. "But as a candidate, you have to know that you could lose and make sure that you stay true to yourself and your message. Even if you lose at the ballot box, you have to be proud of becoming the person that you were through the process."