A “fisc” fight has erupted between Bill Thompson and Joe Lhota — and right in the middle is Rudy Giuliani.

The former mayor threw down the gauntlet to the Democratic field of mayoral candidates, which includes Thompson, by proclaiming on TV that they would give away the store to municipal unions if elected.

“It frightens me because I think what they [the unions] have in mind is trying to elect their candidate so they can get sweetheart deals,” Giuliani charged on NY1.

“We’re going to need a mayor who’s capable of striking fair deals, but striking tough deals that protect the taxpayers of this city, not just deliver the city over to the union members.”

By Giuliani’s reckoning, that individual would be Republican mayoral hopeful Lhota, who served as his deputy mayor, finance commissioner and budget director.

Lhota told The Post in an interview that he would be a staunch guardian of the city treasury during contract negotiations.

“I understand how important unions can be in elevating people into the middle class,” he said, recalling how he attended college on a police-union scholarship when his father was an NYPD lieutenant.

“I won’t deny that from happening. But I also won’t provide an unfair contract to the people of the city of New York in any way, shape or form [by] over-negotiating.”

Thompson, who served as city comptroller from 2002 through 2009, didn’t take kindly to the accusation of being a union stooge.

“Over the years, I’ve shown myself to be fiscally responsible and understanding of the city’s budget,” he told The Post. “It’s a little strange coming from Mayor Giuliani. I came into office right after he left and he didn’t leave us in the best fiscal condition.”

How could that be when Giuliani pushed through a controversial contract in 1996 that contained no raises for two years? Thompson was asked.

He responded that Giuliani also tapped the city’s pension funds in 2000 so he could inflate his own budget, leaving his successors with the tab.

“He also had a pension re-start where he pulled out hundreds of millions of dollars to spend before he left and before the economy went south,” Thompson said.

“So I’m kind of dismissive of the former mayor’s comments, given his history of fiscal irresponsibility.”

Lhota stuck up for his former boss, saying the entire pension board, which is dominated by municipal unions, approved the deal.

“To say that this was solely and singularly a Giuliani policy is hyperbolic in the worst type of degree,” Lhota fired back. “The fact of the matter is Rudy Giuliani never raided the pension system the way it was described by Bill and he should know better.”

The city’s relationship with its unions is bound to be an issue in the mayor’s race since just about every union contract has expired.