Rep. Lee Zeldin (R-Shirley) and Democratic congressional challenger Anna Throne-Holst sparred over immigration and gun control during their first debate as both tried to divert the conversation from the polarized presidential contest.

In the debate Thursday night on Long Island News Radio, WRCN/103.9 FM, Zeldin said Congress should address border security and other issues that Democrats and Republicans can agree on, instead of seeking comprehensive immigration reform.

Throne-Holst, a former Southampton Town supervisor, said Congress needed to deal with the millions of people in the country illegally, calling the lack of a more comprehensive law an example of a “dysfunctional” Congress.

Zeldin repeatedly accused Throne-Holst of lying during the debate, including on his record on gun control.

“I’m keeping a list of all my opponent’s lies,” Zeldin said. “It’s getting larger earlier than I expected.”

Throne-Holst said Zeldin is part of “the most ineffectual and dysfunctional Congress in history.”

The race in the 1st Congressional District, which covers eastern Suffolk County, has drawn national attention, with Democrats hoping to pick up the seat from Zeldin, a freshman.

advertisement | advertise on newsday

Given Republican presidential candidate Donald Trump’s popularity in the district, the prospects for an upset remain unclear.

The debate, moderated by host Jay Oliver at studios at Long Island MacArthur Airport, started with a question to Zeldin about Trump’s tax returns. Oliver asked whether Zeldin considered Trump a “genius” for taking advantage of federal law to minimize his tax payments.

Zeldin said he believed Trump should release his tax returns, but declined to characterize Trump’s tax-payment strategies because he hasn’t seen Trump’s returns.

“I look forward to the opportunity to talk about things other than the hottest items of the day in the presidential candidate,” Zeldin said.

Oliver asked Throne-Holst twice whether she found Democratic nominee Hillary Clinton trustworthy, but she declined to answer.

“I’m not running for president,” Throne-Holst said, before launching a defense of her record as supervisor, a position she held for six years.

Zeldin accused her of “dodging a simple question.”

Zeldin said Throne-Holst’s TV campaign ads showing armed guards during a school lockdown drill banging on doors as children hide inside classes exaggerated what actually happens.

Throne-Holst responded that kids were terrified of lockdown drills, and blamed Congress and Zeldin for not passing stronger gun control laws.

Zeldin is running for his first re-election after defeating six-term incumbent Tim Bishop in 2014.

advertisement | advertise on newsday

Throne-Holst criticized Zeldin for holding a hearing on the Northport Veterans Affairs Medical Center “seven weeks before your election” instead of at the start of his term.

The problems that spurred the hearing — including the closure of an operating room and a suicide in a parking lot — only came up recently, Zeldin said.

“Holding a hearing on a closed operating room before it’s closed, yeah that doesn’t happen. . . . To say I’m supposed to hold a hearing on them losing their life, before they lose their life, is absurd,” he said.

Throne-Holst said, “The VA hospital has had issues for a number of years.”

Zeldin defended the GOP-controlled Congress, saying it had passed more bills signed by the president than the average Congress over the past 25 years.

advertisement | advertise on newsday

“I get it’s a good narrative because people want to see a little bit better direction for our country. I want to see a little bit better direction for our country,” Zeldin said. “Let’s talk about facts.”

Throne-Holst said Congress has passed “only a handful of really meaningful national bills.”