Democratic voters got payback in the New York state primary on Thursday against some of the renegade Democrats who broke away from their party and allied themselves with Republicans in New York’s state Senate.

Six of the eight members of the now-disbanded Independent Democratic Conference (IDC) have lost against more progressive challengers. That includes the powerful leader of the group, Sen. Jeff Klein (D-Bronx), who was unseated by challenger Alessandra Biaggi, a lawyer who worked on Hillary Clinton’s campaign.

New York Gov. Andrew Cuomo may have easily escaped his primary challenge, but the ousting of IDC members may be a sign that power structures are shifting in Albany.

The IDC disbanded in April, but it was one of the weirder institutions in the already strange world of New York politics: eight state senators, elected as Democrats, who broke off to caucus together and team up with Republicans.

The group was formed in 2011 and strengthened GOP power in the state Senate, stymieing progressive legislation from getting to the Senate floor.

But in April, after seven years, Cuomo brokered a deal — reportedly over cookies and coffee at a Manhattan steakhouse — to dissolve the IDC and bring most of the Democrats back into the fold.

That happened days before a special election, which could have tipped the balance of power back to the Democrats for real. But one rogue Democrats — Simcha Felder — decided to stick with the Republicans, leaving the Democrats one vote shy of the majority. (Felder isn’t considered a member of the IDC.)

But voters had already started to take notice of these rogue Democrats’ antics amid the wave of progressive activism after the 2016 election. Activists began targeting these legislators with the campaign #NoIDCNY to push these rogue Democrats out of office. Candidates stepped up to challenge them in the state primaries — winning some high-profile endorsements that added heft to their campaigns.

Now six former members of the IDC and state Senate incumbents have been ousted: Klein, Marisol Alcantara (D-Manhattan), Tony Avella (D-Queens), Jesse Hamilton (D-Brooklyn), Jose Peralta (D-Queens), and David Valesky (D-Syracuse).

Just two have survived: David Carlucci (D-Rockland) is ahead by a razor-thin margin, and just one IDC member, Diane Savino (D-Staten Island) handily held on to her seat.

Felder (D-Brooklyn), the other rogue lawmaker, also survived his first Democratic challenge against Blake Morris.

Democrats are trying to retake the state Senate outright November. The loss of the IDC members doesn’t yet put the chamber in Democrats’ control; the party still has to defend their seats and flip some vulnerable districts in November.

But it’s clear that New York’s progressive voters are paying attention to what’s going on in the state capital in Albany — and on Thursday, long-serving lawmakers paid the price for their Democratic disloyalty.