By the numbers, Long Island’s 2nd Congressional District race appears to favor Democrats: The party has an enrollment edge and is backing a leading Suffolk County legislator, DuWayne Gregory, to represent an area that is 70 percent in Suffolk.

But the numbers don’t account for the unique profile of Rep. Peter King (R-Seaford).

The 12-term incumbent’s blunt-spoken manner and expertise in homeland security issues have made him well-known both locally and nationally. In 2012 — the first year King’s district shifted to include less of his predominantly white, Nassau County base, and more minority communities in Suffolk — he beat his Democratic opponent by 15 percentage points even as President Barack Obama carried the district.

“Generally you can tell if a race is tightening,” King said recently of his 2016 re-election bid, as he attended a fundraiser for a local state Assembly candidate at a Lindenhurst bar. “I don’t sense that.”

However, he called Gregory, the Suffolk legislature’s presiding officer, a formidable opponent.

“Sometimes, you get the impression it’s the last guy out of the room,” King said of some past opponents. “But [Gregory] wanted the nomination. And when you’re head of the county legislature, you’re for real.”

advertisement | advertise on newsday

As King, 72, campaigns from the playbook of a someone who already has high name recognition — bypassing debates, mostly headlining other Republicans’ events — his opponent is waging a shoe-leather bid of door-to-door canvassing.

Gregory, 47, of Amityville, said he hopes the district’s demographics, presidential turnout and voters’ general dislike of Congress will give him a puncher’s chance against King.

“When I interact with people, they’re fed up with Congress and want new leadership,” Gregory said recently outside a West Babylon senior apartment complex, where he’d introduced himself to a dozen residents. King, he said, “can’t argue he’s part of the solution when he’s been part of the problem for so long.”

King countered: “I’m getting the job done.”

He cites his work on the extension of the Zadroga Act that provides federal benefits for responders who were sickened after the Sept. 11, 2001, terrorist attacks. He also points to his work with New York’s Democratic Sens. Chuck Schumer and Kirsten Gillibrand in securing superstorm Sandy aid.

Trying to separate himself from a polarized Congress, King noted that a March report by McCourt School of Public Policy at Georgetown University and the Lugar Center, a Washington, D.C., think tank, ranked him first in a “bipartisan index” of House members based on the number of bills that he joined Democrats to introduce.

Gregory, a Suffolk County legislator since 2008 and its presiding officer since 2014, also cites bipartisan credentials, noting his work on measures to cut the county budget deficit and boost public safety.

In Congress, he said he’d focus on providing federal tax credits for recent college graduates and fighting for equal pay for women.

“Peter King’s area of comfort is national security, which is important, but we have to talk about people’s economic insecurities as well, and that’s my platform,” Gregory said.

The 2nd District spans central and South Shore communities in Western Suffolk and Eastern Nassau, including Sayville and Babylon; the largely Latino hamlets of Brentwood and Central Islip; Wyandanch, which has a large African-American population; and the GOP strongholds of Seaford and Massapequa.

advertisement | advertise on newsday

The district has 161,992 registered Democrats, 157,627 Republicans and 149,376 voters who are either unaligned or belong to minor parties, according to the state Board of Elections.

Democrats’ enrollment advantage over Republicans in Suffolk is 38 percent to 29 percent. Republicans outnumber Democrats in the Nassau portion, 43 percent to 27 percent.

Political observers say they expect Republican presidential nominee Donald Trump, who, according to recent polls, is popular in many parts of Long Island, to at least hold his own in the district.

But Gregory is trying to remind voters that King, who once called Trump “morally and intellectually” unfit for the presidency, is now a backer.

“I just want to make him feel uncomfortable. He’s been really erratic,” Gregory said of King.

advertisement | advertise on newsday

King, while critical of Trump after the release this month of a 2005 video in which Trump bragged about groping women, said, “on the key issues — rebuilding the military, Supreme Court, supporting police — I agree with him.”

Lawrence Levy, executive dean of Hofstra University’s National Center for Suburban Studies, said Trump’s recent slide in national polls, after the video and subsequent allegations by women who said he had groped them, could hurt many down-ballot Republicans nationwide, but likely not King.

“Pete King’s district, as Democratic as it has become, may be the exception to the rule,” Levy said. “The power of the incumbency and personality, and the perception he can work well across the aisle, in particular in times of disaster, may immunize him from a Trump collapse.”

Gregory also is struggling to get his message out widely, as he lacks the money for TV ads. Since launching his campaign in early 2015, he has raised $344,102 and spent $297,897. King has raised $935,512 and spent $873,165.

As of Sept. 30, Gregory had $46,204 in campaign funds on hand compared with King’s $2,974,191.

The disparity in name recognition was evident when Gregory visited the West Babylon senior complex Belmont Villas earlier this month.

Standing inside a leasing center decorated with Halloween cutouts, Gregory reminded about a dozen residents that he’d been campaigning since May 2015.

“You might have been out there for more than a year, but I didn’t hear,” said Jim Banks, 68, a Democrat and retired Port Authority employee. “This is the first time I heard you were even running.”

“Well, we’re not on TV,” Gregory said of his lack of campaign commercials. However, Gregory noted coverage of his campaign by some local media and his efforts to reach voters directly. “There are different phases of a campaign,” he said.

King became the immediate center of attention when he entered a recent fundraiser for GOP state Assembly candidate Shawn Cullinane at Hurricane Grill & Wings in Lindenhurst. King chatted with village officials and took photos with attendees such as Domenic Roseto, 63, of Lindenhurst.

“He does what he says he will do,” Roseto, a Republican, said later when asked why he supports King. “There’s no gray matter. It’s either ‘yes’ or ‘no.’ ”

King made no mention of Gregory during his brief remarks in support of Cullinane. But in referring to other local races, King provided a small window into how he is treating his re-election bid.

“There’s no such thing as a race that can be taken for granted,” King said.