Marchers listen to Darius Craig, the student council president at Digital Harbor High, as he speaks Wednesday, urging his peers to use nonviolent means of expression and to push for change. (Anna McConnell)

Darius Craig was disgusted Monday night watching other Baltimore teens on television as they burned cars, looted shops and hurled rocks at police. But the high school senior understood why his peers were so angry.

Long before Freddie Gray was fatally injured in police custody last month, the city youths had seen plenty of other cases in which young black people were treated with excessive force. They knew it had been going on for decades, and they thought police rarely got in trouble. They were sick of it.

“What we saw, I don’t support it, but I can’t say I don’t understand it,” said Craig, 18. “I do understand.”

Baltimore’s unrest has helped show the world why some residents don’t trust police on the streets. But that same distrust echoes in city schools, where officers stationed in hallways and classrooms are often perceived as posing a threat instead of serving as protectors.

In the winter, just as the city was debating whether school police should be allowed to carry guns while classes are in session, the local NBC affiliate broadcast surveillance video showing a school police officer beating a middle-school girl with a baton, bloodying her head.

“What happened with Freddie Gray is a similar issue with our school policing, but on a larger scale,” said Craig, the student council president at Digital Harbor High, near Baltimore’s Inner Harbor. “In the outside world, some people are being killed. But in our schools, they’re just being beaten, assaulted and . . . arrested.”

Baltimore City schools account for 10 percent of Maryland’s students, but referrals to the juvenile justice system from those campuses accounted for 90 percent of the Maryland’s school-based criminal referrals.

Advocates say there are safety concerns inside schools and that there is a need to address violent behavior: A 2014 Baltimore Sun investigation, for example, found that in a one-year period, school employees had filed more than 300 workers’ compensation claims stemming from assaults by or conflicts with students.

But advocates also say Baltimore has a school-to-prison pipeline with devastating effects on students’ prospects for finishing high school. And advocates say there is far too little public dialogue about the role of police in schools.

“There clearly needs to be a light shined on what’s happening in Baltimore City schools,” said Rais Akbar, a juvenile justice organizer for Advocates for Children and Youth. “What really needs to happen in Baltimore is there needs to be a clear set of governing policies that delineate what the role of an officer in school is going to be.”

Baltimore is the only jurisdiction in Maryland with a school police force that is separate from municipal police.

Darius Craig speaks during a march he organized at Digital Harbor High School in Baltimore. “We the youth have so much power,” he said. “We don’t realize that the future of this city is in our hands.” (Anna McConnell)

Chief Marshall Goodwin, a West Baltimore native who heads the city’s school police force, said he is working toward greater transparency and accountability. He acknowledged tensions between students and officers but said they are limited to “certain areas of our city.”

“My belief, and I practice this and we train with this, is to ensure that officers understand the complexities of students, understand that when they come into schools our students are looking for love and appreciation,” Goodwin said, adding that he encourages his officers to build relationships with students by serving as mentors and athletic coaches. “We’re working extremely hard to rebrand ourselves and be a more open, friendly organization.”

Nearly 25 percent of Baltimore’s 85,000 students are chronically absent, missing more than four weeks of class each year. But the city’s long-struggling schools have made strides during in the past decade. Students made double-digit gains on state reading and math tests, and high school dropout rates fell. Of students who started high school in 2008, 74 percent graduated within five years.

“I really feel like things are on the upswing,” said Ryan Kaiser, the city’s 2015 teacher of the year.

There are positive signs on the school climate front, too, as the number of suspensions fell from more than 11,000 in 2012 to about 7,500 in 2014. But in Baltimore, as across the country, there are still questions about whether student discipline is overly punitive.

Those concerns came to the fore in January, when state legislators, acting at the request of Baltimore’s school board, introduced a bill to allow the city’s school police to carry guns in buildings during school hours.

School police leaders argued that they needed firearms to ensure safety — including to defend against mass shootings after the massacre in Newtown, Conn. — and pointed out that in other Maryland school districts, municipal police working inside schools are allowed to carry guns during the day.

But the bill came as a surprise to Baltimore teachers, parents and students, as there had been no public discussion about arming school police. “There’s no dialogue with the school community about the role of police officers and the need for police officers,” said Aimee Harmon-Darrow, the mother of a first-grader who started an online petition in protest.

Some community members supported the police, saying they wanted them to have every tool at their disposal to ensure safety. But many people expressed concerns that arming school police with guns could escalate, instead of defuse, violent situations — particularly after the video surfaced of the officer using a baton on an eighth-grade girl.

The episode raised broad concerns about the use of excessive force in schools and whether children’s distrust of police is being reinforced in their classrooms.

“It’s very troubling,” said Del. Mary L. Washington (D-Baltimore), who opposed the effort to arm school police during the day. She said that in some schools, discipline referrals that would normally be handled by a teacher or administrator are instead going straight to the police. “We are concerned about criminalizing misbehavior,” she said, adding that she is working to ensure that the same push for greater accountability from city police applies to school police as well.

“It’s our job to make sure that these schools are safe places where students can go for them to escape what is happening in the broader world,” she said.

Legislators withdrew the bill before it could go to a vote. Goodwin said he will continue pushing for the legislation. In the meantime, he has redeployed his officers, pulling them out of all but seven high schools and assigning them instead to patrol neighborhoods around schools. Officers who are called into a school for an emergency may carry their firearms without violating the law, Goodwin said.

Digital Harbor, Craig’s school, is one of those that will retain its officers. One of them is Betty Covington, who has been at the school for 17 years. She has a reputation for building strong relationships with students, including through a girls’ mentoring group she founded. “Every day being a police officer, you should be inspiring kids and letting them know that you can be the best you can be,” she said.

Craig said Covington is the exception, not the rule. He testified against the effort to arm police officers at a school board meeting, saying he couldn’t see how it would make classrooms safer.

“There are many students who feel as if the school police are out of line, they take their power out of hand, that it’s more like outside policing rather than school policing,” Craig said. “What we want is for the police to show the students that they care, that they’re here to help, to keep us safe.”

When students at Digital Harbor complained that school police were being disrespectful — cursing and yelling, and calling Latino students “Mexicans” — Craig organized a meeting with Goodwin and school administrators. They discussed the problem and decided on steps that police could take to address the issues, including attending cultural awareness training.

Craig said that’s the message he wants to get across to other young people in Baltimore: that their voices matter. Two days after riots erupted in West Baltimore and he watched a planned senior center near his home in East Baltimore burn, Craig led a march urging the city’s young people to rise up nonviolently.

Local politicians showed up. The rapper Wale joined in.

Become a police officer, a teacher, a judge, Craig told his peers. Make the world the place you want it to be.

“The destruction of your city doesn’t earn justice for Freddie Gray,” Craig said, speaking through a bullhorn in front of City Hall. “The violence must stop.”