Members of a rogue group of elected Democrats in New York got special bonuses for betraying their party.

Two so-called Democrats in the New York state Senate, who are now facing serious primary challenges, received special stipends in 2017 because they joined the Republican-aligned Independent Democratic Conference.

Sens. Jesse Hamilton of Brooklyn and Jose Peralta of Queens traded their allegiance to the Democratic Party in exchange for committee posts that came with a bigger paycheck.

In 2011, Hamilton and Peralta, along with six other so-called Democrats, joined forces with the new razor-thin Republican majority, in exchange for chairmanships on Senate committees. The following year, Democrats won enough races to take back the Senate, but even then, the IDC refused to caucus with their party, allowing the GOP to maintain control.

Hamilton was rewarded for his allegiance to the GOP with the position of banking chair, giving him a $15,000 yearly stipend on top of his base pay.

Peralta became vice-chair of the Energy and Telecommunications Committee, earning him an extra stipend as well. Two other “Democrats” from the IDC, Diane Savino of Staten Island and David Valesky of Syracuse, also became vice-chairs. They received similar payments.

Vice-chairs normally do not receive stipends like the one given to Hamilton as chair of the Banking Committee, but Peralta, Savino, and Valesky received them anyway. The Republican committee chairs who those funds were designated for opted to redirect their own stipends to the “Democrats” who kept them in power.

Hamilton initially defended his move to the IDC, claiming that “they get results” by cutting across party lines. In reality, the GOP used the majority given to them by the IDC to block progressive legislation that included single-payer health care and a state version of the DREAM Act.

IDC supporters note that the deal with Republicans also guaranteed extra municipal funding to districts represented by its members.

Zellnor Myrie, who is challenging Hamilton in the 20th District in the September primary, does not believe those funds justify the actions of the IDC.

“Why are we getting a $20,000 check for a school when we should get millions?” Myrie asked in an interview last year. “I would hope we could make a strong argument that it’s not worth the betrayal from this alignment.”

Myrie is not alone in his assessment.

“This state elected a Democratic Senate, we should have a Democratic Senate,” U.S. Sen. Kirsten Gillibrand said last year when asked about the IDC. Now she and New York City Mayor Bill de Blasio are backing Myrie and Jessica Ramos, who is challenging Peralta.

“To defend New Yorkers against the Trump Administration, we need committed and unified Democrats in Albany,” Gillibrand said in her endorsement.