Democrat Annette Taddeo has won Tuesday’s state Senate District 40 special election, narrowly defeating Republican former state Rep. Jose Felix Diaz in the hotly contested and expensive race that was closely watched by both state and national parties.

SD 40 wound up being more of a nail-biter than anyone first expected, as Republicans entered Election Day with only a slim 500 early-vote lead. But Hurricane Irma and its after-effects helped the off-year race stay a low-turnout affair.

In the end, Diaz took just 47.2 percent of the vote; Taddeo received almost 51 percent. Christian “He-Man” Schlaerth, with no party affiliation, received just under 2 percent.

“This is a victory for the residents of Senate District 40. The voters wanted a champion in Tallahassee who will fight for higher paying jobs, affordable healthcare and fully funded public schools and I am honored and humbled that they have placed their faith and trust in me,” Taddeo said in an election night statement.

“I pledge to work everyday for the families of my community and not the special interests. I would like to thank my opponent for running in a hard-fought race. Our campaign saw a strong coalition come together … who unified behind a winning plan. I’m beyond thankful for all the work and their efforts and the the thousands of volunteers who committed their time, energy and resources.

“This was a community, grassroots driven effort and I am ready to continue the work in our state capitol.”

Turnout was expected to be much lower than the pre-Irma estimates of 45,000-55,000. Later, working models predicted the number to be around 32-39,000, with larger Election Day turnout seemingly favoring Taddeo. Nevertheless, preliminary turnout numbers put the final number at 47,500 or 14 percent.

The Senate seat was vacated five months ago by former Sen. Frank Artiles, a Cuban-American Republican who resigned in the midst of this spring’s Legislative Session after a profanity-laced and racially charged outburst at a private club near the Capitol.

Diaz, who resigned his state House seat to run for the Senate and is known almost universally as “Pepi,” spent much of Saturday outside an early voting site in Southwest Miami with Cuban-born retired Major League Baseball pitcher Camilo Pascual. Taddeo joined black pastors and churchgoers Sunday for a “Souls to the Polls” barbecue as a DJ blared tunes at near-deafening levels in the background.

The competitive matchup in Senate District 40, which voted overwhelmingly for Democrat Hillary Clinton in last year’s presidential race but also elected the Republican Artiles, is viewed by many as a harbinger of how Democrats might fare in upcoming elections.

It’s also seen as a litmus test for President Donald Trump, who is lauded by many of the district’s Cuban-American voters for chilling his predecessor’s accord with Cuba but is denounced by other Hispanics for his hard-line stance on immigration, especially policies involving undocumented immigrants who were brought to the U.S. as children, known as “Dreamers.”

But Hurricane Irma, which made landfall in the Keys and Southwest Florida little more than two weeks ago, threw a monkey-wrench into the contest, temporarily putting campaign activities on hold after the massive storm knocked out power, internet, cable and mail delivery to much of the district.

Florida Democrats asked Gov. Rick Scott to postpone the election for two weeks. He refused, saying the Miami-Dade elections supervisor had decided the election should take place as scheduled.

Hispanics make up 69 percent of the district’s voting-age population, whites another 20 percent and blacks make up about 7 percent, according to the latest Census data. The swing district, redrawn as a result of a redistricting process that took effect with last year’s election, is almost evenly split between Republicans, Democrats and independents, with Democrats having a slight voter-registration edge.

The race for the open seat has a whopping tab estimated at $2 million, including spending by the candidates and political committees affiliated with the Senate hopefuls.

Democrats had viewed the seat as an opportunity bolster their limited numbers in the state Legislature. The Party registration is about 36 percent Democrat, 35 percent are Republican, and 29 percent are independents or third-party voters. The district is 68 percent Hispanic, 18 percent non-Hispanic white and 8 percent black.

Material from the News Service of Florida was used in this report.