Former Republican congressman Michael Grimm's attempt at a political comeback came to an abrupt halt Tuesday at the hands of incumbent Dan Donovan in the GOP primary.

With almost all precincts reporting, Donovan led Grimm by 29 percentage points, 64 percent to 35 percent. Grimm conceded to his opponent approximately 40 minutes after the polls closed.

Donovan's victory likely will come as a great relief to Republican leadership, who analysts say will enter November confident that the party will hold its only U.S. House seat in New York City. President Trump also endorsed Donovan on Twitter late last month, comparing Grimm to Roy Moore, the failed Republican Senate candidate from Alabama.

Grimm, 48, was trying to win back his old seat in New York's 11th District, which covers Republican-leaning, Trump-supporting Staten Island as well as a slice of South Brooklyn. He represented the area for four years, between 2011 and 2015.

Grimm's earlier tenure on Capitol Hill was chock-full of controversy and ended with his resignation after he pleaded guilty to felony tax fraud involving a restaurant he partially owned before going to Congress. Grimm served seven months in prison and now says the charges were politically motivated.

Donovan, a 61-year-old former public prosecutor, isn't shy about highlighting Grimm's criminal history.

"My opponent went to federal prison and lost his right to vote. He couldn’t even vote for the president," Donovan told Fox News this week. "My opponent says he supports the president, but didn’t say anything to support the president during the presidential election."

Earlier Tuesday, Grimm told Fox News' "The Story" that he was not surprised by Trump's support for Donovan.

"There's a tremendous amount of pressure put on the president by the Establishment that controls the House, leadership and so on," Grimm told Martha MacCallum. "They don't want the president going against their incumbents and ultimately, the president needs the team that's in office now to pass his agenda."

Donovan will face Democratic nominee Max Rose in November's general election.

Fox News' Martha MacCallum, David Lee Miller and The Associated Press contributed to this report.