During an otherwise dismal winter for Democrats, good news arrived suddenly on Sunday night: The New York State Legislature released its draft maps of new House districts.

Democrats have been staring down a midterm abyss, with Joe Biden’s approval ratings cratering and Republicans making gains down the ballot. It is increasingly unlikely Democrats can maintain their tenuous hold on the House and Senate. Republicans are salivating at derailing whatever legislative goals national Democrats, aimless for months now, hope to achieve.

But New York, of all places, offers some hope. A quasi-independent redistricting process designed, a decade ago, to fail—the disgraced former Governor Andrew Cuomo presided over all of it—could not produce an agreed-upon set of maps among the appointed Democratic and Republican commissions. The commission effectively gave up, leaving the Democrat-run legislature to engineer new congressional and state legislative lines.

With the input of House Democrats, the state Democrats delivered a deeply effective gerrymander, one that can add at least three new Democratic representatives to the delegation. With a margin of just 10 in the House, Democrats will need the cushion of New York to survive a midterm wave or at least not fall too far behind Republicans in time for the presidential election in 2024. Even though the state gained population, New York is down one House seat from a decade ago. Had 89 more people responded to the Census, New York would have not lost any seats.

The legislature will vote on the maps this week, and Governor Kathy Hochul will sign them into law soon after. Republicans could mount legal challenges, arguing the gerrymander violates the state constitution, but they will have to meet a very high legal bar to win their case. The maps are very likely to be permanent for a decade.

There is, of course, an irony here. Nationally, Democrats like Chuck Schumer have bemoaned Republican gerrymanders and cried out for redistricting reform. Traditionally, both parties gerrymander, but Republicans have grown brutally proficient at it over the past decade, particularly with state legislative seats in purple states like Wisconsin and Pennsylvania. Ideally, the process would be depoliticized entirely, and independent commissions everywhere would produce maps that best reflect where voters live and who they are.

It would be reasonable for Democrats to view New York as a potential salvation—or at least a bulwark against the losses to come. This is the first time in modern New York history—or potentially all of it—that Democrats have entirely controlled the redistricting process. For a half-century, Republicans held the state Senate, and for a long stretch before then, they controlled the state Assembly too. Every 10 years, Republicans would help sculpt districts that cemented their legislative majorities and protected conservative incumbents, horse-trading with machine Democrats who could tolerate Republican rule as long as certain politicians were safeguarded. The 2018 blue wave washed Republicans out of power and reoriented New York politics, perhaps permanently.

The new maps in New York have some defensible gerrymanders. In New York City, a new 11th district endangers Republican Nicole Malliotakis, who currently represents Staten Island and parts of Brooklyn. Democrats decided to drag the Brooklyn side of the district north instead of east, uniting Bay Ridge, a neighborhood trending left, with the liberal bastions of Sunset Park, Park Slope, and Gowanus. These neighborhoods share a subway line and, for the most part, an ideology.

Max Rose, the former congressman, is running again and could beat Malliotakis if he’s the Democratic nominee. The district, though, may have become Democratic enough to boost the socialist-friendly Brittany Ramos DeBarros, who is competing in a primary against him. Rose has a significant cash advantage and is favored to win, but DeBarros, a fellow combat veteran, is positioned to do well in Sunset Park and Park Slope, neighborhoods that have sent avowed socialists or socialist-like Democrats to the city council and state legislature.

To unmake a swing Democratic district, the state legislators created an odd shape for Jerry Nadler’s Manhattan and Brooklyn House seat, making it awkwardly skirt certain Brooklyn neighborhoods to both add liberal territory to Malliotakis’s district and preserve its Jewish population. Nadler has long represented a bi-borough district that unites Orthodox Jews of Borough Park with much more progressive Jews on the Upper West Side, Nadler’s base.

For progressives and moderates alike, there are victories to celebrate. Alexandria Ocasio-Cortez’s district will take in more of leftist Queens, essentially guaranteeing her a perch in Congress as long as she wants it. Hakeem Jeffries, a rumored successor to Nancy Pelosi whom some progressives have talked about running against in the primary, will have a district that ropes in more conservative parts of southern Brooklyn, insulating him from leftist pressure. The neighboring Yvette Clarke, who survived two primaries in 2018 and ’20, also gets a more conservative new district that curtails the possibility of a young leftist primary challenger.

Long Island, traditionally a GOP bastion, is set to become much more Democratic. Trump apologist Lee Zeldin, now running for governor, saw his district pulled into Nassau County, with most Republicans now packed into a safe South Shore district. A Democrat could be poised to replace Zeldin. A peculiar new district, with some historical precedent, was carved out across the Long Island Sound, joining the Westchester County areas of Larchmont and Rye with Long Island’s North Shore. It would be the sort of district primed for one of the Robert Moses mega-projects that never was, an enormous bridge from Oyster Bay to Rye.

North of the city, Democrats boosted the prospects for Antonio Delgado, a center-left Democrat who flipped a Hudson Valley congressional seat in 2018. Delgado’s new district has been reimagined, sweceping upstate to Binghamton, Utica, and the suburbs of Albany. Claudia Tenney, a right-wing Republican, saw her district disappear, and her home has been drawn into Delgado’s new Democrat-friendly district. Still, Delgado is not a lock to win, with Marc Molinaro, a more moderate Republican who is the Dutchess County executive, mounting a credible bid. Meanwhile, the retirement of another moderate, Trump-skeptical Republican, John Katko, paved the way for Democrats to draw a more liberal district in the Syracuse area.

Only a few Republicans are safe: Tom Reed, Chris Jacobs, and Elise Stefanik, a rising star in the GOP who has emerged as a rabid Trump defender. With Stefanik and Jeffries guaranteed seats in the House delegation for years to come, there is a chance that, one day, the leaders of both parties in Congress could hail from New York state.

The reality is that partisan polarization, the defining feature of American political life, is going nowhere. In this zero-sum world, Democrats must be as cutthroat as Republicans to survive. In drawing these lines in New York, they seemed to have finally internalized this grim lesson.