In their apartment in a rough neighborhood of Brooklyn on Tuesday afternoon, Carmen Torres and her 10-year-old daughter, Jaylee Nieves, rattled off some of what they love most about Jaylee's after-school program at a local community center. They mentioned the drama workshop. And the yoga classes. And the literacy program, where the kids and their parents are brought together to read and talk about such universal favorites as "The Adventures Of Captain Underpants."

Especially in the last year, after Torres lost her job at a cellphone company, struggled with various health problems and watched most of her belongings burn up in a house fire, she relied on the program at St. Nick's Alliance to help her take care of her daughter. So it came as a happy surprise when she learned Tuesday that funding for many of the city's after-school programs had been spared. "Oh great!" she exclaimed, after hearing that Mayor Michael Bloomberg and the New York City Council backed away from a decision to slash children's services.

Although officials have yet to reveal details of the agreement, it appears that the city will not lose any after-school or early child care slots next year, a huge relief to the thousands of parents, activists, child care workers and administrators who rallied in what some said was an extraordinary show of support for children's services at a time when budget cuts decimated many such programs around the country.

This coalition of advocates came together in March, after Bloomberg proposed cutting $70 million from after-school and early child care programs. Because of changes to the early child care system among other factors, advocates calculated that the mayor would need to restore those funds as well as an additional $100 million to keep the programs open in September. The alternative, they said, was losing 31,800 after-school slots and thousands more early child-care slots. They said they hoped the city would save at least some of those slots by the time the city council passed its final budget this week.

As it turned out, the city went further, finding enough money not only for those slots, but perhaps for some additional ones. The mayor's office and city council announced Monday that they'd restored $150 million to the budget for the city's early child-care programs and Out-of-School Times after-school system, which turns out to be more than enough to maintain the current capacity. They also saved two other after-school programs that had been on the chopping block -- the Beacon and Cornerstone programs. The mayor's office contributed $41 million, and council dipped into its discretionary funds to provide the rest. "I'm absolutely thrilled," said Michelle Yanche, the director of public policy at Good Shephard Services, a social service agency in Manhattan. "It's so wonderful to know that so many children and families -- especially all those who came to City Hall, who spoke at our events -- are going to have their programs."

Every year, the mayor and the city council lock eyes in what's known as the budget dance, the old political waltz in which both sides flirt with draconian cuts before finally restoring the money. Advocates said this year was different. "I'm practically an expert in the budget dance," said Yanche, "and in recent years it's been a dance macabre."

Since 2009, Yanche pointed out, annual funding for the city's after-school system has dwindled to $90 million from its peak at $120 million, partly because city council has only managed to patch up some of the cuts made by the mayor.

This week's agreement brings the annual total back up to $120 million. Yanche attributed this to the coalition of child care supporters, called the Campaign for Children. "I can not think of another advocacy campaign that I was either involved in or have watched like this," said Yanche, a member of the campaign. "Program by program by program, child care and after- school, came together at communities, rallies, marches, speaking out in town hall meetings, in every borough. I've never seen that."

For the mayor, the agreement represents what some see as a return to form. Given his national reputation as a leader in education reform and as a champion of longer school days, many observers were perplexed by his decision to slash the programs, particularly for after-school programs, a widely acclaimed system that he helped build. At a press conference on Tuesday, Bloomberg offered a pithy explanation for his change of heart. His office simply made the money for child care a priority, he said -- "and we spent it."

Details about the agreement are expected later this week, including a list of programs that could still lose funding. In the meantime, Campaign for Children members are starting to think about how to ensure there won't have to be last-minute rescues next year. "To be able to not put families through this again," said Yanche, "I'm committed to doing everything possible."