Rep. Dan Donovan thumped challenger Michael Grimm in the Republican primary for the 11th congressional district Tuesday, amid Grimm's bid to return to Congress a little more than two years after he was released from prison.

DAN DONOVAN VS. MICHAEL GRIMM

One of the most closely-watched races in New York was the contentious battle between the two Republicans in the 11th congressional district, which covers Staten Island and parts of Brooklyn.

But the final result was a surprisingly wide one.

Donovan took 63.9 percent of the vote to Grimm's 36.1 — a victory by more than 5,000 votes.

Earlier this month, Grimm had a sizeable ten percentage point lead over the incumbent among likely voters, according to an exclusive NY1/Siena College Poll.

But the race ended up being called less than 30 minutes after the polls closed.

Grimm was hoping to reclaim his old congressional seat. He resigned in 2015 after he pleaded guilty to one count of tax fraud, for which he served seven months in prison. He was released from prison in May of 2016.

Donovan declared his candidacy for Congress four days after Grimm resigned. He defeated Democrat Vincent Gentile in a special election that May, earning 60 percent of the vote. He was then re-elected with 57 percent of the vote.

The primary race between the former political allies was a nasty one from the start, filled with both attacks on policy positions and personal attacks.

But Grimm expressed his support for Donovan, calling on his voters to show up for his opponent in the general election.

"I want to congratulate my opponent Dan Donovan, our congressman. A round of applause for our congressman," Grimm told his supporters in his concession speech. "All of you that worked — this is extremely important, this is extremely important! Extremely important that we keep this seat in Republican hands!"

"It's all over now," Donovan said. "Michael called me, he was very gracious on the telephone."

Both Grimm and Donovan had attempted to demonstrate to voters in the district that they were close supporters of the president. In 2016, Donald Trump won Staten Island with 56 percent of the vote. As a result, they both boasted about their support for the commander-in-chief and were moving to the right.

Donovan, meanwhile, shored up much of the institutional support in the race, including the endorsement of the president. Trump said Donovan would be best for Republicans in the general election, arguing he was the best candidate to defeat a Democrat in the general election and keep the congressional seat in the GOP's hands.

DONOVAN TO FACE MAX ROSE IN NOVEMBER

On the Democratic side of the race to represent Staten Island and a portion of Brooklyn in the House of Representatives, Army combat veteran Max Rose easily beat five other candidates and will face Donovan in the general election in November.

Rose ate up 64.7 percent of the vote, 10,712 ballots. His closest competitor, Michael DeVito, had 19 percent (3,150 votes).

Rose has party establishment support and led the Democratic pack in donations. He has already raised nearly $1 million.