With Hurricane Irma still fresh in their minds, Miami residents on Tuesday voted yes on a big funding measure to protect their city from climate change.

The major port city is set to spend nearly half a billion dollars on projects like storm-drain upgrades, flood pumps, and seawalls, as well as affordable housing and new roads, all measures aimed at bracing for the effects of climate change.

The $400 million approved in the ballot measure in Tuesday’s election comes via a “Miami Forever” general obligation bond, which allows the city government to spend money that it borrows on the municipal bond market, leveraged against property taxes.

It’s a last-minute win for outgoing Mayor Tomás Regalado, a Republican who defied many in his party in championing the effort.

That includes Gov. Rick Scott, a climate change skeptic who said after Irma hit in early September: “Clearly our environment changes all the time, and whether that’s cycles we’re going through or whether that’s man-made, I wouldn’t be able to tell you.”

“I know we have flood-mitigation issues,” Scott added.

Indeed, and Regalado addressed the cause: “We cannot control nature, but we can prepare the city so that Miami can be forever,” he said in a commercial supporting the measure that featured people trudging through stormwater and waves lapping over a breakwall.

By now, Miami residents are familiar with images like these. Hurricane Irma flooded major sections of the city in mid- September, causing at least $58 billion in damages. Hurricane Wilma, in 2005, cost the state more than $20 billion. And there are more people are at risk from sea-level rise in Florida than in any other U.S. state, according to a 2016 study in the scientific journal Nature Climate Change.

The measure passed with about 56 percent of the vote, but it wasn’t a sure shot. Unions, citing unpaid back-benefits on police and firefighter pension funds, opposed the measure, according to the Miami Herald.

But there was out-of-state support. A New York–based nonprofit, First Street Foundation, spent $400,000 through their lobbying arm, Sewall Coalition, on marketing to help get the initiative passed.

Putting the measures into place is now up to Francis Suarez, Miami’s new mayor-elect , who opposed putting the measure on the ballot in July, saying that plan was drawn up “on the back of a napkin,” according to the Miami Herald.