A Manhattan federal judge Monday tossed a lawsuit challenging the Trump administration’s $10,000 cap on deductions for state and local taxes.

Judge Paul Oetken ruled that the plaintiffs — attorneys general for New York, New Jersey, Maryland and Connecticut — couldn’t prove the so-called SALT cap introduced as part of President Trump’s 2017 tax overhaul exceeded Congress’ taxing power.

Prior to 2017, taxpayers were able to deduct all state and local property taxes from their federally taxed income. Following the Republican-led overhaul, deductions for jointly filing married taxpayers were capped at $10,000 — effectively raising their bills by allowing them to write off less of the payments.

“The cap, like any federal tax provision, will affect some taxpayers more than others and, by extension, will affect some states more than others,” Oetken wrote. “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.”

The ruling is a win for the Trump administration, which used the cap to fund other parts of the $1.5 trillion tax overhaul.

“The IRS’s move to end tax benefits for charitable giving is yet another attempt by the Trump Administration to unfairly target the hardworking taxpayers of states like New York,” New York Attorney General Letitia James tweeted earlier this summer after filing the suit.

“We filed this lawsuit to protect our residents from the cap on the state and local tax deduction, an invasive and unprecedented attempt by the federal government to curtail our states’ constitutional rights,” James said in a statement. “We remain committed to defending our taxpayers and our state. We will continue to review the decision as we consider all of our options.”