The Senate gave final congressional approval Thursday to a bill that would limit rate increases for federal flood insurance policies to 18 percent per year.

The legislation also restored grandfathering, so that rates don’t go up when flood maps are redrawn, and allowed home buyers to keep the same flood insurance premium subsidies that the sellers had.

A 2012 law that caused rate increases to be triggered by home sales caused strong objections in coastal areas because it made it so difficult to sell. That provision and others in the law had resulted in sharp rate increases for some homeowners.

The House of Representatives already passed the measure with support from both parties, and it is now headed to President Barack Obama’s desk. Supporters expect he will sign it into law.

“There are lot of people in Florida who are going to be saved unconscionable increases,” Sen. Bill Nelson, D-Fla., said on the Senate floor before the 72-22 vote.

“This compromise will give homeowners some peace of mind, assuring them that their flood insurance rates will not immediately soar from several hundred dollars to the thousands and tens of thousands,” said Sen. Roger Wicker, R-Miss.

Republican Rep. Steven Palazzo of Mississippi, a leader in fighting to roll back the 2012 law, said that the bipartisan compromise, not an everyday event in polarized Washington, “is truly a testament to people overcoming politics.”

The legislation also provides refunds to homeowners who already paid high rates. In a separate voice vote, the Senate passed a bill says that the refunds won’t be given to owners of second homes.

Coburn afterward declared that the Senate had failed to solve the problem of the National Flood Insurance Program, which is $24 billion in debt.

“We undermine the incentive to mitigate for risk,” said Sen. Tom Coburn, R-Okla. He said the Senate took “the politically expedient path” and warned it would add to the debt burden of the future.

He also asserted that most of those who will benefit from the lower rates are among the top 20 percent of wealthiest Americans.

“We gave a break to the most well-off people in the country,” Coburn said. He disagreed with supporters who said that most homeowners who would benefit weren’t wealthy. Coburn said 70 percent of them were in the top 20 percent of income.

Americans for Prosperity and other conservative groups opposed the legislation, saying that the subsidies were not needed and calling for the government to stop requiring flood insurance.