It could have been just another sleepy municipal spat over what should be built on a vacant parcel in a hot D.C. neighborhood. But the debate over the old Shaw Junior High site had something for everyone — and residents and politicians fiercely latched on.

The months-long imbroglio ignited conversations about gentrification, the fate of neighborhood schools and whether the city was doing enough to ensure that students of color are experiencing the benefits of living in a booming city.

Last month, the fight was settled in fiery political fashion, with the D.C. Council narrowly voting to move Benjamin Banneker Academic High — a prestigious application school that serves mostly black and Hispanic students — to the coveted property in the heart of Shaw. In doing so, the council rejected pleas from families in the gentrified neighborhood to resurrect a stand-alone middle school on that same site.

The council’s 7-to-6 vote to move Banneker fell largely along racial lines. Six of the seven council members who voted in favor of the move are black. The six who voted to modernize Banneker on its existing site, paving the way for a stand-alone middle school in Shaw, are white.

The District says the move would allow Banneker to expand enrollment by 300 students, to about 800.

“Almost all of the people who live in poverty in this city are people of color. Almost all of the people who are being priced out of this city are people of color,” council member Robert C. White Jr. (D-At Large), said as he urged his colleagues to move Banneker to Shaw and expand its capacity. “And almost all — 99 percent — of the students at Benjamin Banneker are minority students.”

The way some residents and politicians view it, moving Banneker was about supporting students of color in a city that is becoming increasingly white and wealthy. Shaw — a historically African American neighborhood that has seen an influx of white residents and million-dollar real estate — is synonymous with gentrification in the District, and white families are among those advocating for a new middle school in the Northwest Washington neighborhood.

But others rejected that characterization, insisting that this was not about taking sides in a battle over gentrification. It was, they said, about building a promised neighborhood middle school for all Shaw residents.

“I’m disappointed to see once again a dialogue that is pitting the two school communities against each other and is not rooted in facts,” council member Brianne K. Nadeau (D-Ward 1) said before she voted to keep Banneker at its current site. “I believe in building a Shaw middle school, and I believe in the full modernization of Banneker. I am tired of the narrative of I win and you lose that we have come to rely on in this city.”

Shaw Junior High, on the 900 block of Rhode Island Avenue NW, closed amid declining enrollment a decade ago. But an influx of families since then has reshaped the contours of Shaw and other D.C. neighborhoods, with more families enrolling children in the lower grades.

While more white families have moved into Shaw, the vast majority of students in the neighborhood’s elementary schools are black and Hispanic.

Shaw residents say they have long been promised a stand-alone middle school on the site of the vacant campus. So when Mayor Muriel E. Bowser (D) announced in October that she planned to move Banneker, there was fierce pushback.

And when Bowser wrote a letter to the D.C. Council ahead of a contentious budget vote on the matter, indicating that she considered this to be another gentrification fight in a city thick with them, opposition hardened.

“It was inexplicable to me why the mayor would say that advocating for Shaw Middle to be in Shaw was an example of gentrification,” said Ibrahim Mumin, a black Shaw resident who has lived in the neighborhood for more than 40 years and sent his children to the old Shaw Junior High. “We have a neighborhood that prides itself on restaurants and bars in walking distance. Kids should also be able to walk to their middle school.”

Some Banneker students and parents also reject the narrative of Shaw families versus Banneker families. They say a revamped high school on the expansive Shaw property should not prevent a middle school from being built in the area.

Banneker students lobbied city hall for a new campus, saying a larger site would allow for more robust athletics and other extracurricular activities. They said they have found success at the school and want that opportunity extended to more students. Banneker, which has fewer students from low-income families than the average D.C. high school, attracts top students from throughout the city.

“I wanted to make something of my life,” said Aniya Peay, a junior who lives in Southeast Washington. “And Banneker is a gateway to college.”

Banneker, which had long been slated for major renovations on its existing campus, is a landmark institution in the District’s black community. It dates to the days before integration when the school on the 800 block of Euclid Street NW was a well-regarded black middle school where prominent professionals sent their children.

“You’re seeing the frustration of all previous delays and broken promises in the city,” said John Settles Jr., president of Banneker’s Parent Teacher Organization. “Everyone wins having the top high school in the city in their community.”

Others said the political fireworks surrounding the debate obscured important education issues.

Council member Elissa Silverman (I-At Large) said that the city needs to invest in neighborhood schools and that a new Shaw Middle School presented an opportunity to do that. The five elementary schools in the Shaw area feed into Cardozo Education Campus, which has students in middle and high school.

“This ended up being a proxy debate about race and gentrification,” Silverman said. “But it should have been about urgently modernizing Banneker and making good on the promise to many residents and families who say they want a system of . . . neighborhood schools.”

Students throughout the city tend to leave their neighborhood campuses after elementary school for charter schools or other education options. That dynamic is no different in Shaw. According to city data, only 18.6 percent of middle and high school students in Shaw attend Cardozo. Advocates argue that a stand-alone middle school would bring more families into the neighborhood schools.

D.C. officials said enrollment projections suggest there’s no need for a stand-alone Shaw middle school.

Suki Lucier, who is white and president of the Parent Teacher Organization at Shaw’s Seaton Elementary, said Shaw families regard Cardozo as a temporary middle school until a stand-alone campus is built.

“To say that white families are not choosing Cardozo, it’s true,” Lucier said. “But black, Hispanic and Asian families are also not choosing Cardozo. And I think that’s been unfairly portrayed.”

The Bowser administration said the Banneker decision should not be interpreted as a lack of commitment to neighborhood schools.

“The idea that we are expanding an existing high-quality school that does attract students from all over the city, I think, is the right thing to do,” said Paul Kihn, deputy mayor for education. “We as a city government, we remain deeply committed to making sure that we have quality schools in every neighborhood.”

But hope for a stand-alone Shaw middle school is not entirely lost. The D.C. Council also passed a measure designating Banneker’s current campus as the site of a future middle school for Shaw, although significant funding has not been attached to the plan.

Council member David Grosso (I-At Large), who chairs the Education Committee and voted to move Banneker, said he believes Cardozo could be a viable option for families and urged Shaw residents to put their energy and advocacy into improving their neighborhood school.

“I don’t get why this community should get a pass for not trying to make the school in their neighborhood work,” he said.