Insurgent Republican Larry Zacarese’s upset win over State Sen. Phil Boyle in the GOP primary for Suffolk County sheriff has changed the political landscape, with an impact stretching from the sheriff’s race to Albany.

Zacarese will face Boyle again in a November rematch. But it is unclear whether Boyle will run only with minor party Conservative and Independence ballot lines, or seek the Democratic line as well.

“I’m open to it, but I’m waiting to have conversations with some people in the party and with Phil himself,” said Richard Schaffer, Suffolk Democratic chairman.

The Democrats’ sheriff nominee, attorney Stuart Besen, has yet to form a campaign committee and could leave the race with a minor party nomination for State Supreme Court anywhere in the state.

Boyle vowed to run an “extensive” campaign in November.

Boyle would not say Wednesday whether he will seek the Democratic ballot line.

advertisement | advertise on newsday

But he acknowledged having discussions Wednesday with Senate Majority Leader John Flanagan (R-East Northport) at a local press event of Gov. Andrew M. Cuomo’s. Boyle declined to disclose details of the conversation, and Flanagan did not return calls for comment.

Zacarese expressed confidence he will win any rematch, saying voters want to end the backroom cross-endorsement deals and elect the most qualified sheriff.

“I think people took great pride in voting for someone they felt qualified and is not just toeing the party line,” he said. He cautioned that Boyle could “put himself in a very precarious position” with Republicans by taking the Democratic line rather than helping to unite the party behind the GOP voters’ choice.

Suffolk Conservative chairman Frank Tinari, whose party’s early endorsement forced the GOP to back Boyle, said he was disappointed by the Republican primary, but called it an intraparty contest “where not many people voted.”

“Boyle is weighing all his options, but it too early to speculate what is going to happen,” Tinari said.

Zacarese, a political newcomer who is assistant chief of the Stony Brook University Police, beat Boyle by 2,737 votes, or a margin of 56.25 to 43.75 percent. Turnout was 7.04 percent, according to unofficial returns.

Zacarese carried eight of the 10 Suffolk towns. Boyle only won his hometown, Islip, by 882 votes and Babylon by 62 votes.

Zacarese said his law enforcement credentials, and Boyle’s lack of any direct law enforcement experience, resonated most with voters. Also crucial were two mailings of 3,000 each sent to gun rights backers that attacked Boyle’s vote for Gov. Andrew M. Cuomo’s gun control SAFE Act, said Zacarese. Boyle later called the vote a mistake.

Zacarese’s win also upset plans for Boyle resign his Senate seat early to give Republicans a better chance in a special election on Election Day, rather than hold the contest early next year.

His resignation had been expected to launch Suffolk Legis. Tom Cilmi (R-Bay Shore) for Boyle’s seat and allow GOP Islip Town Board member Trish Bergin Weichbrodt to run for Cilmi’s 10th District seat. If Boyle does not step down, he could run for sheriff — and even if he were to lose, he could run for Senate re-election in 2018.

advertisement | advertise on newsday

Some Democrats also say they are upset that Schaffer is considering backing Boyle. They say the move could anger Democrats energized by President Donald Trump, and hurt Police Commissioner Tim Sini, who is running for district attorney, a Democrat with a cross-endorsement deal of his own.

“It’s a bad idea,” Barry McCoy, a member of the Democrats’ executive committee, said of a Democratic endorsement of Boyle. “Since he lost a Republican primary, what’s the point of angering loyal Democrats to support someone guaranteed to lose?”