California's plan to shield residents from a tax hike under President Trump's tax plan is likely to fail, said seven former high-ranking Internal Revenue Service and Treasury Department officials.

The proposal, passed by the state Senate last month, is seen as a test case for blue states trying to help their taxpayers avoid a giant increase under the GOP plan's $10,000 cap on deductions of state and local property taxes.

The California measure would allow residents to make “charitable” contributions to a new state-run nonprofit group in exchange for a credit that would offset their state tax burden. Classifying the payments as charitable contributions rather than local taxes would help Californians avoid hitting the cap.

But it is unclear that the federal government will greenlight the plan, which also still has to win approval by the state's Democratic governor and assembly.

Two former Treasury officials and five former IRS officials — including a former IRS commissioner, an attorney who served in the IRS chief counsel's office, and a director of the IRS's nonprofit division — have told The Washington Post that the agency could view the charitable contributions as an attempt to get around the Republican tax law, and issue guidance saying that it will view these payments as taxes subject to the cap. That could throw the issue to the courts.

Two former IRS trial attorneys working in the private sector in California gave similar judgments. (The California plan would give taxpayers a credit of 85 percent of the amount they contribute to the new state-run nonprofit organization.)

“I think the service will undoubtedly, almost inevitably look at this as a form of state and local taxes,” said Mark W. Everson, who served as commissioner of the IRS from 2003 to 2007 and now works at the tax consulting firm alliantgroup. “Suddenly, if you make a contribution, you’re relieved of your tax obligation? No. I’d be very surprised if this withstood IRS scrutiny.”

Lawmakers in New Jersey, Maryland and New York are weighing similar schemes to protect their taxpayers from bigger bills. The GOP tax law, which centered on a massive corporate tax cut and temporary reductions to personal income taxes, partially compensated for lost revenue by capping state tax deductions, a move projected to raise $90 billion in federal revenue by 2024.

Democrats have assailed the cap as designed to punish liberal voters, since blue states have higher local taxes than the national average. The average deduction claimed by a Californian who deducts state and local taxes is $18,438, according to the governor's office.

Kevin de León, the California state Senate leader spearheading the proposal and a 2018 U.S. Senate candidate, has not recently consulted with the IRS, according to a spokesman. Staff members for Gov. Jerry Brown (D) have also not spoken to the IRS about the proposal, according to a spokesman, although Brown also raised concerns about whether the IRS could intervene. About three million Californians could benefit from the new plan, according to de León's office.

An IRS official declined to comment on California's proposal. Last month, U.S. Treasury attorney Thomas West said in an interview with the Wall Street Journal: “We are skeptical that some of these [ideas] would work.” Treasury Secretary Steven Mnuchin has called the idea “ridiculous.”

De León is relying on the advice of a group of law professors who have defended the charitable contribution plan, arguing that 30 states already allow residents to earn tax credits by donating to food pantries, private schools and other programs.

“Such a credit program, if well crafted, would stand on solid legal ground,” four professors, including Stanford Law's Joseph Bankman and Chicago Law's Daniel Hemel, wrote in an op-ed in Slate. “Republicans in Congress chose to pass a tax bill that would transfer hundreds of billions of dollars to multinational corporations and their shareholders while making it harder for states and localities to raise revenue for education, public safety, and other essential needs. It is entirely appropriate for state and local governments to push back against this attack.”

But former government practitioners argued that the charitable deduction plan departs from the IRS's mandate to enforce the broad intention of the law.

“It’s just silly when you think about it,” said Marvin Friedlander, who oversaw exempt organizations at the IRS before retiring in 2010.

“If it’s voluntary, why would anyone pay it? I believe the IRS will be forced to challenge these kinds of workarounds that attempt to substitute form over substance.”

Tax experts in California gave similar arguments. “The consensus among tax practitioners here is that it’s not very likely to be allowed,” said Igor Drabkin, a former IRS trial attorney now working in tax law in Southern California. “I think it’s more wishful thinking than reality.”

“It’s so transparently not charitably motivated,” said Chris Rizek, who served as a tax lawyer in the U.S. Treasury Department for three years. “The IRS will have to look at this, and my best guess is that they will say it will not work.”

Dan Reeves, de León's chief of staff, said in an email that nullifying California's plan would also require the IRS to nullify existing voucher programs in red states, and he suggested that the state would be prepared to fight the federal government in court over the issue.

“The bill is still taking shape, so it would be premature for the IRS to cast any sort of judgment on the measure,” Reeves said. “Even if the IRS did move to disallow such deductions, this issue would be ultimately decided in a federal court, where significant precedent supports these types of programs.”