The Treasury Department on Thursday moved to block state efforts to get around a new $10,000 cap on a state and local tax deduction that was part of the GOP’s $1.5 trillion tax-cut law.

“Congress limited the deduction for state and local taxes that predominantly benefited high-income earners to help pay for major tax cuts for American families,” said Secretary Steven T. Mnuchin. “The proposed rule will uphold that limitation by preventing attempts to convert tax payments into charitable contributions.”

Several states have tried to allow wealthier residents to pay some of their taxes as a charitable donation, aiming to give them a federal tax write-off to make up for the lower deductions on property and sales taxes.

But in a proposed rule, published Thursday, the IRS said such a move constitutes a “quid pro quo” that could preclude a full deduction.

New York, for example, has moved to allow residents to make a donation to a state education or health fund, then get a credit on their local property tax bill while also reducing their federal tax bill.

But the proposed rule says, with some exceptions, that taxpayers have to subtract whatever state credits they get for the payments when calculating their federal deductions, severely limiting the resulting benefit.

New York Gov. Andrew Cuomo swiftly threatened legal action, saying he thinks the new rules in his state are consistent with federal law.

“Whether it be extreme weather or political attacks from the Trump administration — my number one job is to protect the people of New York,” he said. “In New York, we will not stand for this abuse of government power