The New York City Council approved a new package of disability pension benefits on Wednesday for police officers and firefighters in what union representatives and some council members described as a surreptitious process.

With little public notice other than an updating of the Council’s website, the legislation sped from Mayor Bill de Blasio’s office to a Council committee to the full body in less than 24 hours.

The council voted 31 to 17 with three abstentions to approve Mr. de Blasio’s proposal, which is aimed at giving relatively new employees benefits closer to those of officers and firefighters hired before 2009, when David A. Paterson, then the governor, vetoed a bill that would have extended the same benefits to all workers.

The Uniformed Firefighters Association and the Patrolmen’s Benevolent Association were jointly seeking a rollback of the 2009 veto, which was made as an effort to curb spending during the recession.

Not long before the Council’s vote, hundreds of firefighters, joined by Gov. Andrew M. Cuomo and Patrick J. Lynch, president of the Patrolmen’s Benevolent Association, took part in a rally in Albany to press their case. But the de Blasio administration’s plan did not award as much in benefits, seeking to strike a balance between increasing benefits for newer employees and not overextending the city budget.

The hasty vote, which must be backed in Albany to go into effect, adds to friction between Mr. de Blasio and the police and fire unions. The police and fire unions were shocked as they watched the pendulum swing the mayor’s way on Wednesday; just two weeks ago, the unions had 39 council members signed on for a resolution they had fashioned, said Stephen J. Cassidy, president of the fire union.

Melissa Mark-Viverito, the Council speaker, appeared to be in lock step with the mayor, Mr. Cassidy said. “The speaker of the Council does whatever she’s told by the mayor,” he said. “That’s good government?”

Albert O’Leary, a spokesman for Mr. Lynch, said the mayor’s proposal appeared to be his “third iteration” and was not previously seen by the police union.

“They could not give us the courtesy of showing us last night,” Mr. O’Leary said. “This is some shifty way of doing business, I can tell you that.”

Ms. Mark-Viverito defended the legislation and the process. Questioned at a news conference before the vote, she said it was up to the news media to see what was on the agenda, though she acknowledged that the Council typically contacted news outlets about legislation.

She said the benefits measure was a culmination of previous discussions. “This is not about doing anyone’s bidding as the media loves to portray this,” Ms. Mark-Viverito said. “This is about being responsible to the City of New York financially while taking care of our officers that are on the front line of doing the work to protect our city.”

At an unrelated news conference in the Bronx, Mr. de Blasio described his approach as “a better model to protect our first responders,” adding that the proposal trumpeted by the unions “would take us back to so many of the excesses of the past.”

“We now want the Senate and the Assembly to recognize that New York City has spoken,” he added.

Before Wednesday, the unions had held an edge, noting that female and minority officers and firefighters hired in recent years in an effort to increase diversity were entitled to lesser benefits.

Beginning officers and firefighters hurt in the line of duty currently get just 50 percent of their final salaries in disability benefits, which could add up to less than $10,000 annually, or $27 a day. Under Mr. de Blasio’s proposal, they would get 75 percent of a higher base, if they are collectingSocial Security disability insurance because they are unable to work. If they are able to work and do not qualify for Social Security, they would get 50 percent of their salaries.

In testimony to the Council on Wednesday morning, Dean Fuleihan, the city budget director, explained that the mayor’s plan would cost the city $105 million through the 2019 fiscal year, compared with $400 estimated under the unions’ plan.

The sudden pension vote overshadowed legislation that had more support.

The Council, by 45 to 5, approved the Fair Chance Act, legislation that was nicknamed “ban the box,” part of a national movement to prohibit employers from discriminating against job applicants who had been incarcerated.

Though a law already applies to city contractors and agencies, it will now be a violation for private employers to inquire about an applicant’s criminal history during an initial interview.

Once a conditional offer is made, an employer can conduct a criminal-background check. If the employer decides to rescind the offer, the employer must give the applicant a written explanation and hold the job open for three days for a discussion with the applicant.

A rally in support of the legislation took place on Wednesday morning at City Hall, with an appearance by Piper Kerman, the author of the prison memoir “Orange Is the New Black.”

Marilyn Scales, 52, said after the vote that her 1995 drug conviction had haunted her for 20 years. A Bronx activist with Vocal-NY, a social services group, Ms. Scales said she had just recently started a part-time job and had not had full-time work since she returned from prison.

“That question,” she said, referring to a box to check for arrests and convictions on applications, “is discriminatory.”