House Democrats passed a bill Thursday to temporarily repeal the limitation on state and local tax deductions imposed by the 2017 GOP tax overhaul, legislation that would primarily benefit wealthy taxpayers in blue states.

The proposal is certain not to pass in the Senate and the White House has threatened to veto it, but its passage demonstrates congressional Democrats' priorities in responding to the Trump tax cuts.

President Trump's Office of Management and Budget said in a statement on Wednesday that "this legislation would unfairly force all Federal taxpayers to subsidize a tax break for the wealthy, as well as excessive government spending by fiscally irresponsible States."

The bill would strike down the part of the tax law that sets a $10,000 cap on federal tax deductions for state and local taxes paid, a provision that particularly affects high-tax states like New York, New Jersey, and California.

The repeal just barely passed in the House in a 218-206 vote, mostly along party lines. Sixteen Democrats voted against it, including Alexandria Ocasio-Cortez of New York, and five Republicans voted for it.

Wednesday's vote was a rare instance of Democrats effectively fighting for tax cuts that would accrue to the rich, with Republicans in opposition. Democrats' bill, though, also would have restored the top individual income tax rate to what it was before the 2017 tax cuts, 39.6%.

House Republicans, though, successfully added an amendment on the House floor that would keep the SALT deduction cap in place for those earning more than $100 million in adjusted gross income.

Many Democrats say that the cap on SALT deductions unfairly affects taxpayers in their states, where incomes and housing prices are higher. They argue that the Republican-passed law targeted Democratic voters in order to pay for the tax cuts.

High-tax states like Connecticut, New York, and New Jersey responded to the 2017 tax overhaul by passing laws to create charitable funds to which taxpayers could give state tax payments, thereby laundering state taxes into federally tax-deductible charitable contributions, bypassing the SALT deduction cap.

A federal judge in New York ruled in September that the 2017 federal tax overhaul's cap on state and local deductions was not an "unconstitutional assault" on the high-state taxes, as Democrats had alleged.