The Senate on Tuesday cleared a short-term extension of the National Flood Insurance Program hours before funding for the program is set to expire.

Senators voted 86-12 on the legislation, which would extend the program through November. Funding for the program is set to expire at midnight.

The bill cleared the House last week and now heads to President Trump Donald John TrumpSteele Dossier sub-source was subject of FBI counterintelligence probe Pelosi slams Trump executive order on pre-existing conditions: It 'isn't worth the paper it's signed on' Trump 'no longer angry' at Romney because of Supreme Court stance MORE's desk.

ADVERTISEMENT

It briefly looked like the Senate would not be able to meet the Tuesday deadline when Senate Majority Leader Mitch McConnell Addison (Mitch) Mitchell McConnellTrump 'no longer angry' at Romney because of Supreme Court stance On The Money: Anxious Democrats push for vote on COVID-19 aid | Pelosi, Mnuchin ready to restart talks | Weekly jobless claims increase | Senate treads close to shutdown deadline The Hill's Campaign Report: Trump faces backlash after not committing to peaceful transition of power MORE (R-Ky.) was forced to file cloture on the House legislation, which could have dragged it out later into the week.

But McConnell canceled the procedural vote on Monday night and instead scheduled a final vote on the short-term extension for Tuesday, meaning the bill will be sent to the White House before the midnight deadline.

Twelve GOP senators voted against the short-term extension. Conservatives had balked at the straight extension arguing the program needs to be reformed because it's in debt.

In the wake of significant damage caused by hurricanes and flooding in recent years, the program was in debt by roughly $30 billion as of last fall, according to the nonpartisan Congressional Budget Office.

GOP Sen. Mike Lee Michael (Mike) Shumway LeeBipartisan representatives demand answers on expired surveillance programs McConnell shores up GOP support for coronavirus package McConnell tries to unify GOP MORE (Utah) blasted his colleagues for "planning to rubber stamp" an extension of the program in its "dysfunctional status quo." He tried to pass legislation last week from GOP Sen. John Kennedy John Neely KennedyMORE (La.) to extend the flood insurance program through January but Lee wanted to add a $2.5 million cap on flood insurance, and Kennedy objected.

Kennedy separately warned that it would be “down-to-the-marrow stupid” to let the program expire.

"We need to reform this program, but we also need to keep it alive through the end of hurricane season. People have been living near the water since Moby Dick was a minnow. ... A reauthorization gives us time to make meaningful changes without scaring 5 million Americans half to death," Kennedy added in a statement.