Rep. Bill Pascrell (D) crushed Rep. Steve Rothman (D) in a member vs. member primary in New Jersey on Tuesday, ending his longtime friend’s eight-term run in the House.

The race between the two Democrats and close allies was expected to go down to the wire, but Pascrell delivered a stinging rebuke to Rothman, who took 30 percent to Pascrell’s 70, with 78 percent of precincts reporting. The Associated Press called the race for Pascrell.

Rothman took to Twitter to concede the race to Pascrell and declare his support for the Democratic nominee.

"Congratulations to Congressman Bill Pascrell and his team, wish them the best," Rothman wrote. "Time to unite as Dems and reelect President Obama!"

Although Pascrell and Rothman had almost identical voting records, the two scuffled bitterly during the primary over campaign tactics and liberal bona fides. Both sought to present themselves as the truer Democrat — a theme brought to the forefront by the proxy battle that emerged in northern New Jersey between former President Clinton and President Obama.

Clinton endorsed Pascrell, who had been an early supporter of former first lady Hillary ClintonHillary Rodham ClintonHannity: I won't discuss Seth Rich story for now "out of respect for the family" Clinton slams Trump's budget: 'An unimaginable level of cruelty' Trump’s crisis of legitimacy MORE’s presidential campaign in 2008. Obama sent top adviser David Axelrod to New Jersey to campaign for Rothman, who backed Obama in 2008, and the president later called Rothman to the White House to indicate his support for the Bergen County congressman.

Both Democrats were first elected to the House in 1996, where they have represented neighboring districts in the suburbs west of New York City. Both ran unopposed in their primaries in 2010, then went on to win reelection in the general election by more than 20 points.

But redistricting in New Jersey required state lawmakers to eliminate one congressional district, and Rothman’s district was largely merged with Pascrell’s. Rothman opted to challenge Pascrell in the safely Democratic district rather than face a much more conservative electorate in a bid against neighboring Rep. Garrett Garrett (R-N.J.).

Early in the primary, Rothman appeared to be gaining ground by portraying Pascrell as more conservative — he even aired an ad declaring his support for gay marriage. But the backlash over how he portrayed Pascrell’s positions may have left a sour taste in the mouth of voters.

Rothman was roundly criticized for a television ad that accused Pascrell of supporting tax cuts for the rich. That ad was given a “pants on fire” rating from the nonpartisan fact-checking site PolitiFact, which said that Rothman had edited footage of Pascrell’s comments to distort their meaning.

"Most of us who were looking at this figured Pascrell had the momentum on his side and would pull this out," said Brigid Harrison, a political scientist at Montclair State University. "What's surprising now is the margin of victory we're looking at."

The final hours of the primary was marked by a contentious battle over more than 2,000 absentee ballots between Pascrell and Rothman, who challenged the ballots and had them temporary impounded. A judge later released them ahead of the counting of the ballots.

The district leans heavily Democratic, meaning Pascrell’s victory in the primary almost assuredly guarantees him a ninth term in the House.

"Tomorrow morning he wakes up and gets back at it and he starts going door to door again, talking to people all across northern New Jersey and letting them know what he's fighting for and what he stands for," said Pascrell spokesman Sean Darcy.

In the Republican primary for the seat, Rabbi Shmuley Boteach, a television personality and author, won his party’s nomination to take on Pascrell, defeating two other candidates with 51 percent of the vote

— This story was posted at 8:39 p.m. and has been updated.