Sen. Pat Toomey, R-Pa., speaks with reporters on Capitol Hill in Washington, as the discussion about flood insurance rates continued this week.

WASHINGTON — Hundreds of thousands of homeowners in coastal and flood-prone areas would win protection from sharply higher federal flood insurance premiums under legislation muscled through the Senate on Thursday after angry constituents inundated Capitol Hill with complaints.

The 67-32 vote reflects widespread alarm about changes enacted two years ago to shore up the program’s finances. In many cases the changes produced unexpected, sky-high insurance rates that are unaffordable for many homeowners in flood-prone areas whose insurance has historically been subsidized by the government and other policyholders.

“Something is just terribly wrong when homeowners are more worried about raging flood premiums than they are about raging floods,” said Sen. Jeff Merkley, D-Ore.

The bill would delay for up to four years huge premium increases that are supposed to phase in next year and beyond under new and updated government flood maps. It also would allow homeowners to pass below-cost policies on to people who buy their homes. People who have recently bought homes and face sharp, immediate jumps in their premiums would see those increases rolled back.

Opponents of the bill say it unravels long-sought reforms of the flood insurance program, which has required numerous taxpayer bailouts and owes $24 billion to the Treasury Department as a result.

“It’s simply irresponsible for the Senate to gut reforms they overwhelmingly adopted just a year and a half ago,” said Steve Ellis, vice president of Taxpayers for Common Sense. He called the bill “an empty, feel-good, four-year delay that will keep people in harm’s way, accelerate the insolvency of the program, increase uncertainty about future rates, and cost taxpayers billions.”

The measure goes to the GOP-controlled House, where there’s tension between supporters of the Senate approach and top Republicans like Financial Services Committee Chairman Jeb Hensarling, R-Texas, who is largely standing behind the 2012 changes. Hensarling spokesman David Popp said the chairman wants “free-market alternatives” to the government-run flood insurance program.

But allies of delaying the rate hikes demonstrated in a 281-146 vote last year in the House that they have sweeping support for delaying premium increases. That vote, on an amendment by Rep. Bill Cassidy, was included in this month’s government-wide funding bill. It effectively guarantees a few months relief to those facing increases late this year because of new maps but doesn’t allow people to pass below-market rates on to people who buy their homes.

At issue is the government-run flood insurance program, in which taxpayers and other homeowners subsidize below-risk rates paid on older homes in both coastal areas threatened by hurricanes and big storms and inland areas near flood-prone rivers. A sweeping overhaul that passed virtually unanimously in 2012 was designed to make the federal flood insurance program more financially stable and bring insurance rates more in line with the real risk of flooding.

The Federal Emergency Management Agency, supporters of the legislation say, is doing a poor job of producing new, accurate flood maps. The bill would also make it easier for homeowners to challenge faulty maps.

“The rates that would be imposed if the law doesn’t get changed will be impossible — not just impractical, impossible,” said Sen. Roger Wicker, R-Miss. “It’s being implemented with faulty data and we need to go back to the drawing board.”

Projections of the new rates have caused anxiety among hundreds of thousands of homeowners. The loss of subsidies when homes are sold has put a damper on the real estate market and threatened home values. Some homeowners are snagged in a Catch-22.

They face rates that, once phased in, they won’t be able to afford. But because of the higher insurance rates, they also face having to sell their properties at distressed prices.

Hours before the final vote, the Senate by an almost 2-1 margin rejected an alternative plan by Sen. Pat Toomey, R-Pa., that would have capped the premium increases on most properties — including homes being sold — at 25 percent per year until the premium reflected the true flood risk. Ten Republicans sided with unanimous Democrats to reject the idea.