ALBANY — Cries of “fantasy” and “fabrication” rang out yesterday as Sen. Kirsten Gillibrand and challenger Joseph DioGuardi clashed in a feisty first debate for US Senate.

The contenders sparred over everything from spending records to résumés during an hourlong debate in Channel 7’s Midtown studios. The full debate will air 11 a.m. tomorrow on WABC-TV.

Gillibrand, a freshman Democrat who holds strong leads in fund-raising and the polls, tried to stay above the fray throughout the debate by reciting her support for “comprehensive immigration reform” and “a middle-class tax cut.”

But she was repeatedly drawn into fights by her Republican challenger, a former congressman still best known as the father of former “American Idol” judge Kara DioGuardi.

The pair traded their toughest blows over jobs each had held outside public office.

DioGuardi accused Gillibrand of shilling for Big Tobacco, while Gillibrand expressed “serious questions” over reports that federal regulators were investigating his ties to a business deal.

“This is a complete fabrication and a misrepresentation of who I am,” DioGuardi said.

DioGuardi insisted he was merely a bit player in the deal described by a Gillibrand ad as a “Madoff-style $1.7 billion Ponzi scheme.”

He returned fire by highlighting defense work Gillibrand did as an attorney for tobacco giant Philip Morris in the 1990s.

“She was actually the architect of everything that company did to try to hide the fact that cigarettes cause cancer,” he said.

“Your arguments are fantasy, absolutely fantasy,” Gillibrand scoffed.

The senator characterized her tobacco work as something she got stuck with when she was “a junior associate in a big firm.”

She pointed out that DioGuardi, too, had represented Big Tobacco, as an accountant.

DioGuardi objected, and she shot back: “Oh, so you didn’t choose your clients?”

Gillibrand, a former upstate congresswoman, also explained her sharp shift to the political left — particularly on gun control and immigration — since Gov. Paterson appointed her to the statewide seat last year.

“One thing that’s clear is that I always fight for my constituents,” she said.

DioGuardi said voters could get “whiplash” watching Gillibrand’s policy changes.