NO ONE CAME OUT looking good in the saga of the Gloucester Community Arts Charter School, but there may be one silver lining as the school prepares to shut down at the end of the academic year.

The leaders of the school, which was facing revocation of its charter by the state for financial instability and academic underperformance, agreed to close down rather than put up a fight. The  school opened two years ago amid strong opposition in Gloucester, where many argued that it would divert badly needed money from the district schools. The school was on shaky ground from the start academically and financially.

But such problems should hardly have come as a surprise. The state’s charter school office had little confidence in the school, recommending against granting it a charter during the initial review of the school proposal. But the state education commissioner, Mitchell Chester, overruled the recommendation and urged the state board of education to grant the charter. That decision drew heavy condemnation from school opponents. The cries only grew louder when the Gloucester Times obtained an email from state Education Secretary Paul Reville to Chester urging him to recommend approving the charter despite any misgivings he might have because the Patrick administration was eager not to alienate key “moderate allies” in its education efforts “like the Globe and Boston Foundation.”

Meanwhile, anger over the school among some in Gloucester spilled over into petty power-plays once the charter school opened, with the School Committee voting to ban Gloucester Community Arts students from taking part in the district schools’ band program.

“No one is on the side of angels in what happened in Gloucester,” says the city’s mayor, Carolyn Kirk. She has been flooded with calls this week from charter school families who are devastated about the school’s imminent closure. But Kirk says as painful as the whole ordeal has been, it has had one very positive, if perhaps unexpected, side-effect: a fresh focus on shortcomings in the city’s school system and the resolve to make improvements.

“The silver lining was that it did force a debate about improving the quality of education within the district,” says Kirk. “As a result, we now have an innovation school.”

This fall, the city’s O’Maley Middle School was converted to an innovation school, a model authorized by state legislation passed in 2010 that allows district schools to exercise many of the same autonomies over staffing, curriculum, and the length of the school day that charter schools enjoy.

The innovation school legislation was drafted, in part, to give districts the tools to compete with charter schools by offering many of the same innovative approaches that have made charters a popular choice among families in districts that are struggling to boost student achievement. Gloucester’s district schools perform at about the middle of the pack, with students scoring near the statewide averages on MCAS exams.

If Chester had “taken the advice of the charter school office,” says Kirk, “maybe the whole thing could have been averted.” She says the most important lesson for the state is to “take the advice of their charter school office and maintain the integrity of that review” when charters are proposed.

For districts like Gloucester, where there is an appetite for charter schools, she says there is a lesson as well. “Why are we obsessing about what the charter school is doing? Why aren’t we obsessing about we’re doing and change the subject from kicking the kids out of the band to improving education in the district.”

Michael Jonas edits CommonWealth Beacon's Opinion page. His own reporting has a particular focus on politics, education, and criminal justice reform.