Supporters scored a partial victory in their fight to keep the middle school alive at Wadleigh Secondary, a politically connected and historically important performing and visual arts school in Harlem.

Marking one of Richard Carranza’s first major moves as chancellor, the education department on Monday pulled its proposal to cut Wadleigh’s middle school grades — just days before the Panel for Educational Policy was scheduled to vote on the school’s fate. But the department also announced that it will begin laying the groundwork to combine Wadleigh with another district middle school in the building.

The school, which was saved from closure once before after a public outcry, will continue to serve students in grades six through 12 for the next school year.

“After listening to extensive feedback from Wadleigh families and community members, the chancellor is withdrawing the proposal to truncate the middle school grades at Wadleigh Secondary School,” the education department confirmed in an email.

The fight for the school, which is part of the city’s high-profile Renewal turnaround program, is likely not over. Saying the middle school’s academic performance is “not acceptable,” the education department announced it will begin a planning process to combine Wadleigh with Frederick Douglass Academy II. For school communities, such mergers can feel just like a closure, with one school often retaining its name, keeping the same leadership, and preserving its unique approach to teaching.

“We still have a lot of work to do,” said Gigs Taylor-Stephenson, president of the Wadleigh PTA. “The whole idea was to maintain our identity as an arts school with an strong academic component. It doesn’t seem like that’s the case, and we’ve argued time and time again that we don’t want to be a separate middle and high school.”

Education department spokesman Michael Aciman stressed that the plan to combine the schools is still in the early phases and said “the community will help shape and decide what the proposal looks like.”

The decision marks Carranza’s first foray in the controversial school closure process since becoming chancellor earlier this month. Kim Watkins, president of the Community Education Council in District 3, which includes Wadleigh, said the chancellor met with parent leaders and elected officials to hear their pleas to save the middle school.

“Something wasn’t right, and it was very reassuring to our council and to the community in Harlem that our chancellor took an interest,” Watkins said. “His fresh eyes, in conjunction with the hard work of community leaders, led us to the update we’re hearing today.”

Monday’s about-face marked at least the second time supporters beat back a proposal to shut down the middle school at Wadleigh, which has long struggled academically but enjoys a remarkable constituency. When it was targeted for closure in 2011, the famed philosopher Cornel West was among those who rallied to keep it open — and so did Mayor Bill de Blasio, who at the time served as the city’s public advocate. A new principal was installed but Wadleigh landed on the city’s list of struggling schools just two years later, and officials drew up an “action plan” to help turn things around.

After de Blasio was elected, Wadleigh became a part of the city’s latest improvement efforts: the Renewal program, which infuses schools with added resources and tacks on extra time to the school day. Still, the school has continued to struggle. In December, the education department recommended shutting down the middle school, citing low enrollment and three years without a single student scoring “proficient” on state math exams.

The latest battle to keep Wadleigh alive drew support from the NAACP, the local Community Education Council, elected officials including a state senator and the city comptroller, along with countless parents, students, alumni and school staff. Many argued the school still hasn’t received the help it needed to boost test scores. City data shows Wadleigh enrolls students who are usually the toughest to serve: Many enter middle school already lagging behind their peers, almost all come from economically needy families, and a disproportionate number have special needs.

“How about you just help us and keep this school together,” one student asked at a rally on Friday outside Wadleigh. “I don’t want this school to close down.”

This time around, the education department says it will appoint an assistant principal to focus on the middle school grades in both Wadleigh and Frederick Douglass. Starting next school year, the middle school grades will begin working together on math instruction and share arts resources, and staffers will train together, according to the education department.

Planning for combining both schools will start this year, with the merger set to take effect for the 2019-20 school year.

The announcement could deepen a clash between city officials and the popular but controversial Success Academy charter network, which also runs a school in the same building. Just last month, Success founder Eva Moskowitz stood outside the school and said the city has ignored Success’s requests for more room there. The network has filed a complaint asking state education officials to intervene.

A spokesman for Success declined to comment Monday, but the network’s leaders have said the charter school enrolls one-third of the students in the building, with only a quarter of the space.