NEW YORK, N.Y. -- Former New York Republican Gov. George Pataki Thursday evening endorsed John Kasich for president, saying the Ohio governor is the best candidate for the Republican party in November's general election.

"We need to win this race," Pataki said, adding that Kasich is the "only" candidate in the GOP race that "not just beats Hillary Clinton, he trounces Hillary Clinton. And he will win this race if he gets the nomination of the Republican party."

Pataki, the former governor of New York from 1996 to 2006, formerly endorsed Marco Rubio. Pataki was one of Kasich’s rivals for the Republican presidential nomination last year before dropping out of the race in late December.

Pataki's nod marks Kasich’s first endorsement from a former 2016 rival.

The Pataki endorsement comes just five days before the New York primary, which has taken on new importance since the fight for the GOP nomination has lasted into April.

Kasich has been campaigning hard in New York, making a number of trips to locations across New York City and in upstate New York. While he sits far behind both Donald Trump and Texas Sen. Ted Cruz in the battle for delegates, he currently stands second place in most New York polls, behind Trump and ahead Cruz.