Despite years of denying he worked for a law firm holding millions of dollars in government contracts, Newark Mayor Cory Booker’s last three tax returns show the exact opposite.

And he’s now blaming his accountant.

In federal tax forms detailing $689,500 in payments from the Trenk DiPasquale firm, Booker checked off that he “materially participate[d] in the operation of this business” from 2010 to 2012.

“Under penalty of perjury, he’s saying he participated,” explained Jay Soled, a Rutgers accounting professor. “Regulations under [the tax code] say that to ‘materially participate,’ you have to work over 500 hours.”

Booker, a Democrat running for US Senate against Republican Steve Lonegan, has repeatedly said he stopped working for the government-linked firm in 2006, soon after taking office, to avoid “the appearance of impropriety.”

He insists the money he continued to collect from the firm from 2007 to 2012 wasn’t salary but part of a confidential “separation agreement” or buyout.

Kevin Griffis, a Booker spokesman, blamed the discrepancy on an accounting error.

“The box was checked in error by the tax preparer, and amended returns will be filed,” he said. “The mayor has not done any work on behalf of his former law firm since 2006.”

Griffis refused to say if Booker reviewed his own signed tax forms before submitting them.

Booker’s accountant, Leonard Finkel of Queens, did not return calls for comment.

Lonegan, who released his own tax returns two weeks ago, said Booker’s filings raised a red flag.

“I wonder how legitimate the actual returns are,” he said.

From 2007 to 2012, the firm, where Booker was once a partner, raked in more than $2million in fees from agencies over which Booker had influence.

When The Post revealed last month that he was paid by the firm while mayor, his campaign refused to detail how much.

On Friday, his campaign gave reporters three hours to look over 15 years of Booker’s tax returns. They were not allowed to make copies or take photos.

Since 2007, the firm has raked in $1,287,639 in legal fees from Newark’s Housing Authority, $554,663 from a local wastewater agency and $212,318 from the Newark Watershed, records say.

Soon after becoming mayor, Booker named Modia Butler, head of a charity he organized, to the authority board. Butler later became board chairman. Booker served on the watershed’s board.