Two young girls near the scene of a burned CVS in West Baltimore. (Jim Bourg/Reuters)

THE STATE of Baltimore’s public schools was spotlighted in the aftermath of riots that rocked a city mourning the death of a young black man, Freddie Gray, while in police custody. Bad schools are only one element of urban dysfunction. But they are both a consequence and a cause of inequality, and improving them is essential to keeping another generation from being trapped by poverty. There’s no excusing violence. But as the attorney for Mr. Gray’s family said of the young people who took part in the rioting, “The education system has failed them.”

The past decade has seen students in the 84,730-student system making gains, particularly in reading, but the educational outcomes are still depressingly low. Just 16 percent of eighth-graders and 14 percent of fourth-graders were proficient in reading on the 2013 National Assessment of Educational Progress; the performance of Baltimore students ranked in the bottom third of the nation’s largest cities, according to Trial Urban District Assessment data. More than a quarter of high school students don’t graduate in four years. Nor is money the problem: Baltimore ranks near the top in per-pupil spending for big cities.

Giving poor parents the kind of alternatives that wealthier families take for granted would help. Some competitive pressure on the school system might help, too. But Maryland is so hostile to charter schools that many children in Baltimore find themselves stuck with no options.

There are 31 public charter schools in Baltimore, enrolling 11,506 students — about 14 percent of public school students. The District, by contrast, has 112 charter schools, enrolling 37,684 students — 44 percent of public school students. Thousands of Baltimore students are on waiting lists for charters; KIPP Baltimore, for example, has 635 students queued up. But Maryland’s restrictive laws have kept good schools from meeting that need while preventing charters from innovating as they would like to do. A report this year by Baltimore’s Abell Foundation lamented that national charter management organizations with proven track records in educating low-income children are dissuaded from locating in Maryland because of the lack of autonomy they would have in choosing curriculum and hiring personnel as well as meager financial support.

Gov. Larry Hogan (R) tried to get the General Assembly to approve needed reforms, but the Democrat-controlled, union-friendly legislature not only gutted his plan but also passed a bill that would impose onerous new regulations on charters. The bill is awaiting action by the governor; he should veto it.

Baltimore’s tumult underscores the need to go back to the drawing board and come up with a plan that welcomes high-quality charter organizations that have helped bring school improvement to cities such as Washington and New Orleans. Much as Hurricane Katrina served as a beacon for rebuilding New Orleans’s education system, so could the death of Freddie Gray serve as a wake-up call in Maryland.