Democrat Tom Suozzi, a former congressman, will defeat Republican rival Mazi Pilip in a closely watched special election to represent New York's 3rd Congressional District, ABC News projects, based on analysis of the vote.
Tuesday's race drew attention for potential signs of how voters are feeling early in a presidential year, particularly in a suburban area that has swung between the two major parties.
The contest between Suozzi and Pilip also focused on some issues that are expected to be intensely debated in the lead up to November's presidential race, including immigration and the border, public safety, the Israel-Hamas war and abortion access.
Suozzi, a three-term former congressman, mayor and county executive on Long Island, faced off against Pilip, a county legislator and former Israeli soldier, with higher name recognition and a more active campaign presence -- as well as a Democratic spending edge.
Facing sharp attacks from Pilip over what she called Democrats' failed border policies, a particular flashpoint in New York City given an influx of many new migrants and asylum-seekers, Suozzi sought to stress that he supported both tightening immigration laws and finding a bipartisan compromise like a failed deal recently announced in the Senate.
He also hammered at his opponent as too vague on issues like abortion and unwilling to get behind solutions to big problems.
Speaking at an election night party in Woodbury, New York, Suozzi echoed that message, saying, "The people are watching. They want us to start working together. So our message is very clear: Either get on board or get out of the way."
Suozzi's event was briefly interrupted by a protester with a Palestinian flag, an apparent reference to Israel's war against Hamas in Gaza.
"There are divisions in our country where people can't even talk to each other," Suozzi said in his remarks. "All they can do is yell and scream at each other. And that's not the answer to the problems we face in our country. The answer is to try and bring people of goodwill together, to try and find that common ground."
Steve, an independent contractor from Roslyn Heights, told ABC News at a polling site there that he was backing Suozzi because “I just believe that his politics and what he believes in is better than Republicans."
On whether he would vote for Suozzi in November, if he runs for reelection to a full term, Steve, who declined to give his last name, said: "Let's see what he accomplishes in the next six months."
Suozzi and Pilip were running in a special election as a result of disgraced former Rep. George Santos' expulsion late last year.
Turnout appeared to be down sharply from the two previous, regularly scheduled elections in the district, as is often true of specials. Wintry weather on Tuesday also affected get-out-the-vote plans for both candidates.
At her own event on Tuesday night, in East Meadow, New York, Pilip said she had called Suozzi to congratulate him.
"And I love you. Each one of you worked so hard every single day in the last eight weeks," she told supporters. "And we did a great job. We are fighters. Yes, we lost but it doesn't mean it's going to end here ... I'm so proud to be part of this amazing organization, the Republican Party."
The battle on Long Island to succeed Santos could look relatively minor, since the winner will be in office for only a few months before the next general election; and it's just one congressional seat.
But the election involved millions of dollars, the attention of national groups and the return of notable political players -- a reflection of how this off-cycle contest didn't pass by with little fanfare.
Instead, the race came to be seen by some Democrats as a high-stakes litmus test of their electability in the very areas where they'll need to win in November if they want to retake Congress.
Both Republican presidential candidate Nikki Haley and President Joe Biden issued statements on the results, casting Pilip's loss as another defeat for the GOP under Donald Trump, Haley and Biden's mutual rival.
Despite Biden facing poor approval numbers and a growing streak of bad polling against Trump, Democrats have continued to see local success, including in special elections.
Trump reacted to the results on social media late Tuesday by accusing a "very foolish" Pilip of trying to "straddle the fence" instead of embracing the MAGA movement.
Suozzi, running a decidedly centrist campaign, said heading into Election Day that he could be an example -- and a "warning" -- for his party, particularly in a place like Long Island, where conservatives have been more and more successful in recent years.
"I think my whole campaign is a warning sign for Democrats," he told ABC News. "I've always been somebody who has been battling with my own party. I've always been a centrist ... and they asked me to run. Why? Because they know my message is what we need to be talking about."
"Crime and immigration and taxes is not a Republican message. It's an American message," Suozzi said. "And Democrats as well as Republicans need to be addressing these issues."
ABC News' Isabella Murray contributed to this report.