When the city decided last year to cut more than 30,000 summer program slots for middle school students, irate City Council members grilled the schools chancellor and advocates rallied outside City Hall.

In response, the city restored the funding. But officials made clear: It was a one-time rescue.

Now, those same advocates are demanding that the city once again fund the summer programs, which they say are concentrated in low-income neighborhoods. On Wednesday, they gathered once more in front of City Hall to protest the cuts.

“So many middle school kids need a safe place to be during the summer,” said Stephanie Gendell, an associate executive director at the Citizens Committee for Children of New York, one of dozens of advocacy groups that are calling for $20.4 million to fund the programs. “The programs prevent summer learning loss and keep kids out of trouble.”

But, for now at least, the mayor does not appear to be budging.

When he presented his proposed budget for next fiscal year in January, he cited the summer program cuts as an example as an example of necessary cost-saving. The program is “something we had thought was a good thing, but wasn’t necessarily a priority we could devote to, so that’s not in here,” he said when asked by a reporter about savings in this year’s budget.

On Wednesday, City Hall spokeswoman Amy Spitalnick doubled down on that message: “We were clear in May 2015 that the seats would not be funded in summer 2016.”

The roughly 31,000 summer seats in question are an extension of de Blasio’s after-school initiative for middle-schoolers, called School’s Out New York City, or SONYC.

SONYC had included a summer component in 2014, but, last spring, the city informed after-school directors that nearly $28 million for summer programs was going away. Instead, the city planned to redirect that money to the “Renewal” initiative, a high-profile improvement program for 94 low-performing schools. (Officials said that funding would not have gone to the summer programs in the first place had it not been for an administrative error.)

The news came as a shock to many program directors and middle schools, some of which had already started enrolling students for that July. And it outraged some City Council members, including one who told Chancellor Carmen Fariña during a testy hearing last May that the cuts were “totally creating havoc in many families’ lives.”

Just hours after that hearing, the city announced that it would restore funding for those summer program slots — but only for one year.

Despite that, the same coalition of about 150 early-childhood and after-school providers and advocacy groups, collectively called the Campaign for Children, is fighting for the city to restore the summer programs. On Wednesday, the coalition released a report showing that the neighborhoods that stand to lose the greatest number of slots — including Brownsville, Brooklyn and East Harlem — also have child poverty rates that far exceed the city’s 30 percent average.

Advocates argue that the summer programs, much like de Blasio’s signature pre-kindergarten and after-school initiatives, boost student achievement while also providing free childcare to working parents. They say the summer programs, which are run out of schools and other community-based sites, are vital for keeping teenagers active and safe while school is out of session.

The 31,000 summer slots tied to de Blasio’s middle school after-school expansion are separate from other summer programs that existed before that, which the city continues to fund. And the education department offers summer school for students in grades two to 12, which it is expanding this year.

Mericia Thomas-Reid said her seventh-grade daughter, Nazarine, has taken dance and step classes at a Police Athletic League summer program in Brownsville for the past two years. Advocates said that program is likely to shut down this year if the mayor does not restore its funding.

“The city shouldn’t interfere with our children’s learning,” Thomas-Reid said. “If the summer program is gone, my daughter will have nothing else to do.”