Democrats thought that when it came to gerrymandering, they could have their cake and eat it too. Now, New York Democrats are at each other’s throats after getting called on their hypocrisy and caught out in court.

While Democrats complain about gerrymandering any time Republicans put forward a congressional map, Democrats in the New York legislature came up with a truly grotesquely gerrymandered map. In the process, they violated the state constitution after voters had approved an amendment in 2014 to limit partisan redistricting.

Their botched gerrymandering attempt was struck down by the courts, and now, Democrats across the state are turning on each other. Rep. Sean Patrick Maloney, the chairman of the Democratic Congressional Campaign Committee, opted not to run in his own redrawn district. Half of Maloney’s job is to reelect incumbent Democrats, but he’s so nervous about the national environment that he opted to run in a primary against Rep. Mondaire Jones for a seat that would be less competitive in the general election.

Obviously, this creates several problems. Rep. Ritchie Torres said Maloney’s allies were guilty of “thinly veiled racism” for saying Jones would be “ideologically better suited” for a different seat, and Rep. Jamaal Bowman accused Maloney of trying to “dismantle and tear down black power in Congress.” Rep. Alexandria Ocasio-Cortez said Maloney should step down from his role at the DCCC if he is going to primary another member, and she kind of has a point. Speaker Nancy Pelosi decided not to weigh in on the fracas.

And Sean Patrick isn’t the only Maloney now facing a primary against another member. Rep. Carolyn Maloney, the chairwoman of the House Oversight Committee and a 30-year veteran of the House, will be facing Rep. Jerry Nadler, the chairman of the House Judiciary Committee who joined the House two months before her.

Meanwhile, Rep. Hakeem Jeffries has decided to attack the courts. A potential successor to Pelosi as the leader of the House Democratic Caucus, Jeffries decided that the man appointed by the court to enforce the constitutional amendment New Yorkers voted for would “make Jim Crow blush.” Race-baiting has become Jeffries’s go-to move, so naturally, he would use it when Democrats lose a gerrymandered map.

Democrats hate gerrymandering, except when they are the ones benefiting from it. New York's attempt was a clear example, and now that it has backfired, the party is in disarray. New York Democrats are reaping what they sowed. Hopefully, Democrats across the country remember this when they put forward legislative maps that don't match their gerrymandering rhetoric.