The Trump administration’s signature tax reform law’s cap on federal deductions for state and local taxes does not violate the constitution, a federal judge ruled on Monday.

A federal judge dismissed a lawsuit filed by four states against the Internal Revenue Service, rebuffing their challenge against a new $10,000 cap on the deduction for state and local taxes, also known as SALT. Those states were New York, New Jersey, Maryland, and Connecticut.

The so-called SALT cap weighs most heavily on high-tax states, including the four involved in Monday’s decisions, where state and local taxes are most likely to exceed the cap. The ability to deduct the cost of local taxes made it easier for state and municipal governments to raise those taxes because much of their costs could be deducted from federal taxes. The states had claimed that the cap was an “unconstitutional assault” on their sovereignty.

“The Court recognizes that the SALT cap is in many ways a novelty. But the States have failed to persuade the Court that this novelty alone establishes that the SALT cap exceeds Congress’s broad tax power,” U.S. District Judge J. Paul Oetken of the Southern District of New York wrote in his decision.

Judge Oetken was appointed in 2011 to the federal court on the recommendation of Senator Charles Schumer (D-NY) and was the first openly gay man appointed to the federal judiciary.

Republicans had argued for years that the unlimited deductibility of state and local taxes allowed local politicians to escape the full costs of their own taxes and pass those on to lower-cost states. President Trump, defending his tax administration’s tax proposals, said in 2018 that capping the deduction would encourage citizens to “make sure that [their] politicians do a good job of running [their] state.”

The states argued in court papers that statements like these were evidence that the law was passed to penalize the so-called “blue states.” They claimed that the cap amounted to “coercion” intended to prevent them from enacting or continuing high taxes rates.

The court rejected those arguments, pointing out that even with the caps, many residents of the high-tax states actually received a tax cut and that the cap was not so burdensome to amount to an unconstitutional burden. If not for the cap, Judge Oetken pointed out, the tax cuts might have been smaller.

The issue of the SALT cap is an awkward one for Democrats. Its beneficiaries are almost exclusively wealthy households with pricey houses. And the effect of repealing it would be to inflate the government’s budget deficit, something Democrats complained of when Trump cut taxes.

The case is State of New York et al. v. Mnuchin et al. (18-CV-6427).