Republican presidential hopefuls Donald Trump, Ted Cruz and John Kasich each made a spirited pitch to more than 1,000 guests at Thursday night’s state GOP gala in Manhattan.

Trump, the GOP front-runner, praised the values of New Yorkers, while Kasich, looking to build momentum for his campaign before the state’s April 19 primary, announced the endorsement of former New York Gov. George Pataki. Cruz called on Republicans to unite behind his candidacy.

The trio of candidates made their appeal at a $1,000-a-head dinner inside the Grand Hyatt hotel in midtown, as hundreds of anti-Trump protesters rallied outside behind police barricades.

Trump, the real estate mogul turned television personality, painted himself as an architect of New York City and a defender of its values.

Without naming Cruz, Trump responded to his rival’s now famous dig that Trump embodies “New York values.”

“What do we see in New York values?” Trump asked the audience, going on to list the heroism of the 9/11 first responders, the work ethic of transit workers, and “families playing in Central Park.”

advertisement | advertise on newsday

“It’s a work ethic. . . . It’s about family. . . . These are the values we need to make America great again,” Trump said.

Trump rattled off his successes in real estate, noting the Hyatt venue was one of his first major development projects.

Kasich, who is waging an uphill battle for the party’s nomination, touted Pataki’s endorsement, and looked to build on state polling numbers that show him running second to Trump.

“I’m the only one who can beat Hillary Clinton,” Kasich said, repeating his argument that polls show him competing closely with the Democratic front-runner.

Pataki, who dropped his bid for president in December, stood alongside Kasich before the dinner and formally endorsed him in front of a phalanx of reporters.

Get the Newsday Now newsletter!

The best of Newsday every day in your inbox.

He predicted that Kasich “trounces” Clinton if he gets the GOP nomination.

Cruz, a senator from Texas, also spoke about 9/11.

“New York City is hallowed ground. . . . The site of the worst terrorist attack on American soil,” he said, criticizing other sitting politicians as being soft on Islamic extremism and vowing to crack down as president.

“Our military will no longer be governed by political correctness,” Cruz said.

Gov. Susana Martinez of New Mexico, who was honored at the event, joked about the ongoing battle for the GOP nomination.

advertisement | advertise on newsday

“It’s been an interesting campaign,” Martinez said. “Why don’t we just do ‘rock, paper, scissors’ and get it over with?”

Before the dinner, hundreds of anti-Trump protesters filled pens outside the hotel. And keeping the protesters away were hundreds of cops, plastic handcuffs dangling from their pants pockets, with backup from the NYPD’s anti-disorder unit, which handles terrorism and protests.

“Hell Toupee If Trump Gets Elected,” “TRUMP = NAZI,” and “NYC Is a No Trump Zone!” were among dozens of signs, placards and banners the protesters held aloft, shouting for hours. The ralliers touched on a hodgepodge of left-leaning causes, including police misconduct, capitalism and the Palestinian cause.

Splinter groups broke off, marching through nearby Grand Central Terminal and the Met Life building, and tried to enter the Hyatt, but were rebuffed by police and hotel security. The marchers included Matthias Toia, 19, of West Babylon. Toia, who cleans garbage from the beach at Robert Moses when he’s not in school at Nassau Community College, said he came to rally because “Trump spews a lot of hate.”

“I have a lot of Muslim and Hispanic friends, and I don’t think it’s right what he wants to do,” Toia said, two of his friends from West Babylon nearby. “He’s spewing out a bunch of lies” on the national debt, on immigration, Muslims and more, he said. Toia with his friends marched between the protesters’ pen, Grand Central and 42nd street, holding a sign that said “NY loves all of us.”

advertisement | advertise on newsday

There were a handful of arrests within those groups, though most proceeded peaceably, if loudly.

With Matthew Chayes