The move has set off a scramble for an open seat in a suburban district where Democratic Party enrollment has soared in recent years.

[Representative Peter King’s exit highlights the G.O.P.’s suburban problem.]

That surge is part of a broader transformation in New York’s suburbs, where Democrats are overtaking Republicans. Demographic and socioeconomic changes are fueling the shift, and, as my colleague Vivian Wang wrote, they mirror a nationwide trend: Historically moderate or conservative suburban voters are slowly tipping left.

Here’s how party registration has fared across some of New York’s suburbs, and in the city itself, since 1996:

Long Island

Between 1996 and 2019, the number of registered Democrats in Nassau County jumped by more than 150,000 , while the number of registered Republicans dropped by 30,000, according to figures from the state Board of Elections. Democrats there now outnumber Republicans 411,000 to 328,000 .

In Suffolk County, the Democratic Party added more than 162,000 members, while the G.O.P. gained fewer than 18,000 . Democratic voters now narrowly lead Republican voters, 366,000 to 332,000 .