While states around the country have moved to pare labor costs and limit the power of unions, the move is all the more striking here, in a Democratic-leaning state where Democrats control both houses of the Legislature and union membership is among the highest in the country. Most Democratic legislators opposed the benefits reductions, but their leaders voted in favor of the changes, exposing deep, longstanding rifts in the party that lawmakers say could weaken it in coming elections.

The fight over benefits reflected both Mr. Christie’s ability to exploit the divisions among Democrats, through his alliances with more conservative Democratic party bosses and legislators, and his success at using the public-sector unions as a foil in his drive to shrink government spending. It has also allowed a nationally known but highly polarizing governor to claim the mantle of bipartisan conciliation, telling audiences that New Jersey is setting an example that other states and the federal government should follow.

On Thursday, thousands of people wearing union T-shirts and buttons filled the Assembly visitors’ gallery, the State House corridors and, in a high-decibel protest, the sidewalks, lawns and streets around the building. A procession down State Street included a hearse draped with a banner saying “The Soul of the Democratic Party,” and organizers with bullhorns led the crowd in chants of “We’ll remember in November!” and “Kill the bill!”

Unions have been broadcasting advertisements attacking Democrats who support the bill — particularly Stephen M. Sweeney, the Senate president — and this week union leaders have spoken of the difference between “real Democrats and Christie Democrats,” pointedly including in the latter group Mr. Sweeney, who also is an official of the ironworkers’ union.

“This bill is not about savings; it is about breaking the backs of the hard-working men and women of this state,” Assemblyman Patrick J. Diegnan Jr., a Middlesex County Democrat, said Thursday after the session began. “I challenge everyone in this chamber today: how many have even read the full 124 pages of union-busting activities?”