The U.S. House voted Thursday to temporarily repeal a cap on state and local tax deductions in the 2017 federal tax overhaul enacted by congressional Republicans and President Donald Trump.

Lawmakers from New Jersey, which has the highest average property taxes in the nation, and other high-tax states, such as New York, Connecticut, and California, have complained that the change had a significant and unfair impact on their constituents.

The House, controlled by Democrats, voted largely along party lines to remove the $10,000 cap on state and local tax (SALT) deductions for tax years 2020 and 2021. For tax year 2019, it would raise the cap for married couples filing taxes jointly to $20,000. The $10,000 cap would remain in place for taxpayers who earn more than $100 million, money that would pay for $500 tax breaks for teachers and first responders.

Republican Rep. Brian Fitzpatrick of Bucks County was one of just five Republicans who joined Democrats in voting to pass the legislation.

Many households in Southeastern Pennsylvania also used the deduction, and some have said their federal tax bill rose.

The bill will now go to the Senate, where it is unlikely to pass; Republicans, who hold the majority of Senate seats, have defended the 2017 tax changes.

The bill would pay for the elimination of the SALT cap by raising the tax rate for the top income brackets.

An analysis by the Tax Policy Center found that about 65% of households paid less in individual income taxes in 2018 as a result of the new law, while 6% of households paid more and the rest paid the same amount.

But lawmakers in high-tax states have said that their constituents are hurt by the tax changes. Public officials in New Jersey and other high-tax states have said they were unfairly targeted in the 2017 tax law because their states are controlled by Democrats.

New Jersey has also joined other states in attempting to find workarounds to the cap and suing the IRS.

The bill’s passage was “long past due,” Rep. Andy Kim (D., N.J.), said in a statement after the vote.

“The 2017 tax law ... took money out of the pockets of New Jersey’s working families,” Kim said.

Some Republicans argued on the House floor that removing the cap would hurt the middle class, because only wealthy taxpayers benefit from it.

“This bill is clearly a tax cut for the few,” said Rep. Kevin Brady (R., Texas).

But Rep. Peter King (R., N.Y.), one of the few Republicans who supported the elimination of the cap, said his colleagues were incorrect because high-tax states have middle-class families who used to deduct more than $10,000 in state and local taxes.

“The people in my district who are getting screwed by this are not millionaires,” King said. “What’s middle class in your state might be different than mine.”