Hoping to blunt a controversy that could overshadow the end of the hotly contested AG’s race, Sen. Eric Schneiderman will contribute to charity all the money he received thanks to a legal loophole that lets state lawmakers deduct work expenses even from days they’re not at work, NY1′s Josh robin reports.

The benefit enabled Schneiderman to deduct $35,316 last year in work expenses alone – more than a third of his salary.

Throw in other deductions like taxes, charity and financial management, and he wrote off more than two-thirds of his salary – more than 167 percent higher than others in his wage bracket.

Schneiderman’s campaign said his 2009 benefit was just $900. It will be reviewing all of the senator’s returns since he was elected in 1998 to determine if more money needs to be donated.

The senator’s campaign stressed that this deducation is completely legal, and said he agreed to donate the money to clear up any “misunderstanding.” That didn’t stop Schneiderman’s opponent, Staten Island DA Dan Donovan, from slamming the senator at a hastily-called press conference earlier today.

“New Yorkers deserve better than this, and this is the kind of behavior that they are sick and tired of,” Donovan said.

“This is not a person that New Yorkers can trust to be the chief law enforcement officer of our state, someone who acts only after he’s been caught.”

Meanwhile, Schneiderman is accusing Donovan of routinely accepting more money than he was allowed to under law – most recently in the from of a $10,000 contribution from a Manhattan automotive firm. (The corporate limit is $5,000).

The DA says he’ll return any contributions exceeding the limit, but that didn’t stop state Democratic Chairman Jay Jacobs from calling on the state Board of Elections to launch an investigation into what he called Donovan’s “blatant campaign violations of campaign finance law.” (Here’s Jacobs’ letter).