SEA ISLE CITY — U.S. Rep. Jeff Van Drew, who infuriated Democrats by switching parties and proclaiming “undying support” to President Trump, was in a tight race Tuesday night to beat back the effort to replace him with Democratic newcomer Amy Kennedy in New Jersey’s 2nd Congressional District.

Van Drew appeared confident of victory as he addressed supporters around 9:45 p.m. inside one of his favorite election night locations: the Oar House Pub in Sea Isle City. But he said he expected Democrats to argue it out over remaining votes before the results become final.

“This was a hard and a brutal election,” Van Drew said to cheering supporters. “A lot of money and a lot of power was used against me quite frankly. We had a difficult year. The truth is, we believed. We believed in America.”

Fueled by a late alliance with an old Democratic operative, Craig Callaway, Van Drew sought to take votes from Atlantic City and Pleasantville and deny Democrats the revenge they were desperately seeking against a politician Gov. Phil Murphy called “a traitor.”

Kennedy, appearing on Facebook Live, said Tuesday night she would await final results in her effort to unseat Van Drew — a former Democrat from Cape May County who switched parties after refusing to vote to impeach President Donald Trump. With 75 percent of the vote reported, Van Drew was ahead by 9,500 votes: 51 to 48 percent.

“It looks like that process will continue beyond tonight,” Kennedy said. “I’m hopeful that South Jersey will get the representation it deserves.”

Kennedy, the wife of former Rep. Patrick Kennedy, was seeking to be the only member of the Kennedy clan left serving in Washington, after her cousin-in-law Joe Kennedy III lost the Senate primary in Massachusetts.

She was successful in beating the South Jersey Democratic political machine of George Norcross in the primary. In the general election, though, she was up against a veteran candidate working with the controversial Callaway, an Atlantic City operative known to swing elections.

For his part, Van Drew said he felt comfortable as a Republican and campaigned with increasing confidence that his loyal supporters would rally around him, and renewing his connections with business people in Atlantic City, particularly in the Bangladeshi community.

“I’m the same person,” he said in an interview last month. “I was always moderate to conservative, and there were always folks when I was a Blue Dog Democrat who wouldn’t support me. This is who I am.”

Kennedy appeared to underperform in Atlantic County, according to preliminary results, allowing Van Drew to build up an early lead elsewhere. Callaway came by Van Drew’s party late Tuesday and said it was “a pleasure” to work to defeat Kennedy, whom he worked for in the primary.

Late Tuesday, Kennedy campaign manager Josh Roesch said “tens of thousands of votes” were still uncounted, the majority in Democratic Atlantic and Cumberland counties. “We fully expect to win,” he said.

New Jersey Gov. Phil Murphy called Van Drew “a traitor” in an appearance in Atlantic City earlier Tuesday, and said Kennedy’s chances lay in a strong turnout for her in Atlantic County. Voting was reported to be brisk in Atlantic City, a possible reflection of Callaway’s ability to drive up voters and ballots his way.

“We have got to run the score up in Atlantic County, and specifically Atlantic City,” Murphy said. “I’m sick of traitors! I want to put Jeff Van Drew into retirement.”

The election in New Jersey’s southernmost district took on a super charge when Van Drew switched parties, after being warned that his vote against impeachment would leave him vulnerable in a Democratic primary. He took a celebratory turn with Trump at a raucous Wildwood rally in January.

He proved an attractive target for the national Democratic Party, which poured in money and ran negative ads against him, even poking fun at his preference for tailored suits.

Meanwhile, national Republicans took aim at Kennedy, portraying her as an elite liberal living in a waterfront mansion. And her defeat would mean that no member of the storied political family will hold elected federal office.

The district, which covers all of Atlantic, Cape May, Cumberland, and Salem Counties, and parts of four other counties, is a sprawling political battleground. Trump narrowly won here in 2016, following back-to-back victories by Barack Obama. More than 30% of registered voters aren’t affiliated with either party.

For Van Drew, a familiar South Jersey politician who has been winning elections from mayor of Dennis Township to state senator to U.S. representative as a Democrat with crossover appeal, this campaign placed him on unfamiliar territory as a Republican.

Stripped of the support of the Democratic machine, he nonetheless sought out Callaway, whose massive but controversial vote-by-mail wrangling has shown the power to sway past elections.

By Election Day, Van Drew had recorded $110,000 in payments to the organization run by Callaway, a convicted felon and former president of Atlantic City Council. Voting was said to be brisk on Election Day in Atlantic City. In the campaign’s closing days, the New Jersey Globe published a story citing nearly $30,000 in expensed meals to fancy Washington D.C. steakhouses, a few on days when he did not show up at congressional hearings.

For her part, Kennedy, a former public schoolteacher, showed some political muscle of her own. She marshaled a network of teachers and suburban women, of Black voters in the district’s cities, and campaigned relentlessly at public appearances until Monday, when her campaign announced she’d been in contact with someone who later tested positive for COVID-19.