Peter Harckham will be facing off against incumbent state Sen. Terrence Murphy in November.

With 243 of 249 districts reporting, Harckham had 11,116 votes to Kesten’s 9,579 in the Democratic primary for the 40th Senate District.

See New York primary results for statewide, Dutchess and Ulster elections

Harckham is a former Westchester County legislator who resigned in 2015 to take a job with the administration of Gov. Andrew Cuomo. He said he’d be suited to bring in support from voters not affiliated with either party, giving him an edge in the November general election against Murphy, a two-term Yorktown Republican.

Kesten said that the governor “waited to ask, or to push” Harckham in the race until after he’d begun fundraising and building support. By the time Harkham got started, Kesten had already netted endorsements from many local Democratic committees in the Senate’s 40th District, which includes northern Westchester and parts of Putnam and Dutchess counties.

District 40 is one of the few battleground districts in the state that could determine which party controls the Senate. Every legislator is up for election in November and a gain of even one seat for Democrats can topple a slim Republican majority.