A federal judge has tossed lawsuit by New York and other states against the $10,000 cap on state and local tax deductions in a move that upheld a key provision of the federal government’s 2017 tax law.

Gov. Andrew Cuomo has railed against the cap on the cap on deductions, arguing the measure was meant to harm higher tax states like New York, where taxpayers could deduct their state and local taxes from their federal income tax.

The cap, however, limited those deductions to $10,000 — a move state officials worried would send wealthier New Yorkers to states where taxes are not as high.

The multiple states challenging the SALT cap argued the move unfairly singled out Democratic states where taxes are higher and questioned the constitutionality of the cap.

Federal Judge Paul Oetekn, however, reaffirmed the cap as part of Congress’s “broad powers” to write and pass tax legislation under the Constitution.

The cap, like any federal tax provision, will affect some taxpayers more than others and, by extension, will affect some states more than others,” the judge wrote in his ruling. “But the cap, again like every other feature of the federal Tax Code, is a part of the landscape of federal law within which states make their decisions as to how they will exercise their own sovereign tax powers.”

He added that states challenging the cap have failed to show it restrains their “decision-making process” and had “no basis for concluding that the SALT cap is unconstitutionally coercive.”

Updated: In a statement, Cuomo left open the possibility of an appeal.

“There is no doubt in my mind that President Trump’s unfair tax policy targets New York and other blue states by funding tax cuts for corporations and the rich on the backs of New Yorkers,” Cuomo said. “New York is already the largest ‘donor state’ in the nation – paying the federal government $36 billion more than we get back every year. The SALT cap takes this gross imbalance and supercharges it, costing New Yorkers another $15 billion each year.

“The bottom line is this policy is unprecedented, unlawful, punitive and politically motivated – and it must be stopped. We disagree with the court’s decision and are evaluating all options including appeal.”

State of New York Et Al v Mnuchin Et Al by Nick Reisman on Scribd