Lee Zeldin, a staunchly conservative congressman from Long Island, has won the Republican primary for governor, the Associated Press projects.

By 10:29 p.m on Tuesday, Zeldin was named the projected winner, according to the AP.

The 42-year-old, who had been the establishment candidate, fended off challenges from three feisty opponents: Rob Astorino, a former Westchester County executive, Harry Wilson, a former hedge fund manager who self-funded his campaign, and Andrew Giuliani, the son of former Mayor Rudy Giuliani.

Just before 11 p.m., Zeldin was introduced to the stage at a catering hall in Baldwin by his preferred pick for lieutenant governor Alison Esposito as "All I Do Is Win" by DJ Khaled played.

"Are we ready to fire Kathy Hochul?" Zeldin told a cheering crowd of supporters. "We will restore balance and common sense to Albany again."

Zeldin spent most of his victory speech attacking Gov. Kathy Hochul, the Democratic incumbent who was the projected winner by the AP over an hour before.

The primary victory now hands Zeldin the formidable challenge of trying to become the first Republican to become governor since 2002. He will face Hochul, who has raised more than $30 million for her campaign and had more than $12 million left as of mid-June. Zeldin's campaign raised about $9 million so far, but had just $2 million on hand.

Still, some said Republicans have an opportunity to make the general election competitive by seizing on the issues of rising crime and inflation.

The race was a contest of conservative values. A four-term congressman, Zeldin — who was endorsed by former Vice President Mike Pence — ran a campaign that appeared to tear a page straight from a hard-right Republican playbook: he championed former President Donald Trump, celebrated the end of Roe v. Wade and vowed to protect gun rights. He was among the House representatives who voted to overturn the 2020 election results, a decision he most recently defended by saying he had been concerned about changes to the election process that were brought on by the pandemic.

A lawyer and officer in the U.S. Army Reserve, he has promised a tough-on-crime approach, saying he wants to repeal bail reform and would fire Manhattan District Attorney Alvin Bragg, largely seen as a progressive prosecutor, on Day 1. He has argued that lawmakers need to do more to support police and cited his introduction of a “Law Enforcement Bill of Rights” in Congress.

Now, as the official Republican nominee, Zeldin faces the question of whether he can win over moderate voters at a moment when the fight over abortion rights has taken center stage. During the two contentious debates, Zeldin was among those who said he felt the state had gone too far with its abortion protections and in April, he told an anti-abortion rights group that “it would be a great benefit for the state of New York to have a health commissioner who respects life as opposed to what we're used to.”

Around 10:40 p.m., Andrew Giuliani took the podium to concede the race and rally his supporters behind the projected winner of the primary. Preliminary results showed him in second place behind the projected winner Tuesday night.

“We need to make sure we lick our wounds tonight, and tomorrow, let’s get up and let’s support the Republican nominee, Congressman Lee Zeldin,” he told the crowd. Giuliani said he would do everything he could to help Zeldin get elected and he urged his supporters to do the same.

“New York is at a crossroads,” he said, noting the polarizing debates that have divided the state in recent years, from an uptick in violent crime to arguments over COVID-19 protocols.

He said voters needed to elect someone who would repeal cashless bail, get rid of vaccine mandates, create jobs and make budget cuts. As Giuliani rattled off the laundry list of conservative talking points, several people in the room yelled “Stop the steal!” and booed at the mention of Hochul.

Shortly before he took the mic, a member of Giuliani’s team instructed staff at the party venue to turn Hochul’s victory speech off the TV.

After thanking his competitors, his wife, his friend Curtis Sliwa and various other supporters, Giuliani took a moment to acknowledge his father, former New York City mayor and attorney for President Donald Trump, Rudy Giuliani.

“I want to thank somebody who I love with all my heart, America’s mayor, Rudy Giuliani,” he said, as the room erupted in applause. He closed his speech with a call to action, urging his supporters to spread the red wave and to “make New York great again.”

Jon Campbell contributed to this report.

This story was updated with additional comment from the candidates.

Correction: A previous version of this article misstated where Lee Zeldin held his primary night party. It was in Baldwin.