New York Gov. Andrew Cuomo has complained that the federal tax overhaul approved last year gave tax cuts to wealthy people who didn’t need the assistance.

But the budget deal he signed last week includes loopholes designed to give those same wealthy people tax breaks, in what even some liberal watchdogs say is a legally suspect giveaway to the rich.

The complicated scheme grew out of New York’s anger about provisions in the federal law that included a cap on state and local tax write-offs.

High-tax Democrat-dominated states such as New York saw the cap as discrimination, and some began looking for workarounds.

New York’s solution was to create a way for state residents to make donations to publicly run health or education funds part of their state taxes. The state says taxpayers can write off that money on their federal forms as charitable contributions, reducing their overall tax bill to Uncle Sam.

But the people likely to take advantage of the break are the state’s wealthiest residents — the same people Mr. Cuomo said didn’t need federal tax cuts.

Matthew Gardner, a senior fellow at the left-leaning Institute on Taxation and Economic Policy, said this appears to be another example of wealthy Americans “gaming” the tax system through special loopholes.

“The whole point is to help New Yorkers to avoid a tax hike, and in particular to help wealthy New Yorkers avoid a tax hike,” he said.

Mr. Cuomo’s office didn’t respond to requests for comment, but New York is just one of a handful of high-tax blue states that sought to find ways to protect its residents from changes in the federal law.

Along with the governors of Connecticut and New Jersey, Mr. Cuomo has vowed to sue the federal government. The governors say the tax law illegally targets their states, leaving some residents with higher tax bills relative to others who received bigger tax cuts.

“The elimination of full state and local deductibility is a blatantly partisan and unlawful attack on New York that uses our hardworking families and tax dollars as a piggy bank to pay for tax cuts for corporations and other states,” Mr. Cuomo said in January as he announced plans to sue.

His chief beef is with the federal law’s $10,000 limit on deductions for state and local taxes. Nationwide, few Americans are projected to breach that limit. But in New York, where property and other local taxes are high, residents are wary.

The state calculated that its taxpayers would be socked with an additional $14.3 billion a year in higher taxes. About one-third of the state’s tax filers, or 3.3 million people, take the state and local deduction, with an average benefit of about $22,000 in 2015.

Close to 84 percent of the state’s counties also have an average benefit higher than the $10,000 cap, said State Budget Director Robert F. Mujica Jr.

In Nassau, Rockland and Westchester — three counties with the highest per-capita income in the state — more than half of taxpayers have property tax bills alone that exceed the $10,000 cap, according to a study from the Fiscal Policy Institute.

But the rich would bear most of the pain under the new tax bill.

A study by the Partnership for New York City, looking at state taxpayers, found that the average single person making no more than $200,000 a year and married taxpayers making less than $1 million a year would receive tax cuts this year — in some cases worth tens of thousands of dollars.

But the rich were going to pay more, the partnership said.

Grover Norquist, president of the conservative Americans for Tax Reform, said New York’s push to help those wealthy people smacks of hypocrisy.

“Here you have the left claiming last December, ‘Oh, this is all about tax cuts for the rich and nothing for the middle class,’” he said. “And then the Democrats go to bat when 90 percent of Americans are getting a tax cut, 6 percent may see an increase, and the 6 percent is largely people with high incomes and expensive housing in high-tax states like New York.”

Economists said New York, and in particular New York City, were worried about increasing an already high tax burden on their most talented earners. The top 1 percent of earners in the city already pay 49 percent of the city’s income tax burden.

“The underlying goal now, as it was three months ago, is apparently to prevent upper-income New Yorkers from losing itemized deductions under the new federal tax law,” Mr. Gardner said.

The Tax Policy Center characterized the $10,000 cap as a “progressive element” in the law. It estimates that 96 percent of the additional tax from the limit will fall on the top 20 percent of taxpayers across the country, and 57 percent of the new taxes will fall on the top 1 percent of earners.

People with higher incomes historically have been more likely to itemize their deductions in the first place, and those who opt to take the standard federal deduction wouldn’t benefit from the break for charitable giving.

The state’s solution — turning some taxes into charitable contributions to make them once again deductible — is heating up debates in tax law circles. Some analysts say it won’t hold up, while others say there is precedent for it.

Under the new rules, New Yorkers can take state tax credits of 85 percent of the donation amount and a 95 percent credit to lower their local property tax bills if they contribute to education or health care funds that localities are now allowed to create.

New York also set up an optional state payroll tax that tries to effectively lower the federal income tax liability of workers in the state.

Though the scheme envisions a net increase in employees’ take-home pay, a complicated formula that could rely on lower wages for employees on the front end could invite conflicts with contracts, labor agreements and minimum wage laws, said Jared Walczak, a senior policy analyst at the Tax Foundation.

“Where you might be able to pull this off would be in small companies with highly paid employees that could all agree on the deal,” he said. “So imagine law firms, hedge funds, consultancies being able to take advantage of this — a relatively small percentage of well-off New Yorkers.”