This story has been updated.
At least six state Senate Democrats who aligned themselves with Republicans in recent years were upset in Thursday's primary elections, including one who represented southern Westchester and the Bronx.
Alessandra Biaggi, a lawyer who worked for Gov. Andrew Cuomo and Hillary Clinton, upset incumbent state Sen. Jeff Klein in the Sept. 13 Democratic primary for the 34th District, which includes parts of Yonkers, Mount Vernon and New Rochelle.
Klein is the former leader of the Independent Democratic Conference (IDC), which caucused with Republicans in the state Senate since 2014.
"We have now cut the head of the IDC snake,” Biaggi said at her victory party.
Her grandfather, Mario Biaggi, served in the New York Police Department for 23 years and was a Democrat representing the Bronx in Congress from 1969 to 1988.
Biaggi credited gubernatorial candidate Cynthia Nixon with educating voters about the duplicity of the IDC. Gov. Andrew Cuomo endorsed Klein.
Also defeated on Thursday were five other former IDC members: Sen. Jesse Hamilton in Brooklyn, Sen. Marisol Alcantara in Manhattan, Sens. Tony Avella and Jose Peralta in Queens; and Sen. David Valesky in Syracuse. They lost, respectively, to Zellnor Myrie, Robert Jackson, John Liu, Jessica Ramos and Rachel May.
The two former IDC members who survived Thursday's primary election were Sen. David Carlucci of Rockland County -- who defeated Julie Goldberg -- and Sen. Diane Savino of Staten Island.
In another highly-watched race, Sen. Martin Dilan, who was not part of the IDC, was defeated by Julia Salazar, a 27-year-old democratic socialist and community organizer in Brooklyn. She blasted Dilan's close ties to the real estate lobby and won despite negative news coverage in the final weeks of her campaign.
Ramos is a community organizer and former aide to New York City Mayor Bill de Blasio.
May, a teacher and first-time candidate, said she would be a "true champion for Democratic priorities."
Former Westchester County legislator Peter Harckham declared victory Thursday night in his Democratic primary battle against Robert Kesten in the 40th state Senate race.
The former aide to Gov. Cuomo led with 52 percent of the vote, according to unofficial Board of Election returns.
If declared the winner, Harckham would face two-term Republican incumbent Terrence Murphy in the Nov. 6 general election.
Click here to sign up for Daily Voice's free daily emails and news alerts.