It didn't begin with Freddie Gray.

Before Freddie Gray, there was Jerriel Lyles, who had just purchased a box of chicken in a P&J Carry Out. According to the Baltimore Sun's stunning 2014 investigation into police brutality, a plainclothes officer stopped him, frisked him, and ordered him to get down on the floor. He refused. "The officer hit me so hard it felt like his radio was in his hand," Lyles later testified. "The blow was so heavy. My eyes swelled up. Blood was dripping down my nose and out my eye."

The police officer objected to Lyles's version of events, but he couldn't explain to the jury why he stopped Lyles, or how Lyles got hurt. Maybe he poked himself in the face, the officer suggested. The jury ordered the city of Baltimore to pay Lyles $200,000 in damages.

Before Freddie Gray, there was Starr Brown, who was pregnant and walking up the front steps of her home when two girls were attacked on the street. By the time the cops came, the attackers were gone — but Brown, inside her home, could hear the police berating the women who had been attacked.

Brown, angry, demanded the cops chase down the attackers rather than yelling at the victims. An argument began, and the police tried to arrest Brown. She grabbed a nearby railing, screaming that she was pregnant. "They slammed me down on my face," Brown later said. "The skin was gone on my face." The city paid Brown $125,000.

Baltimore has paid out more than $5.7 million in jury awards and settlements

These examples — and there are many, many more — in the Baltimore Sun's powerful investigation into police brutality in Baltimore. "Over the past four years," Mark Puente wrote in September 2014, "more than 100 people have won court judgments or settlements related to allegations of brutality and civil rights violations." In total, the city paid out $5.7 million in jury awards and settlements, and spent $5.8 million more on outside law firms.

And don't fool yourself. These 100-odd cases aren't the sum total of the police brutality in Baltimore. "What tiny percentage of the unjustly beaten win formal legal judgments?" asked Conor Friedersdorf at the Atlantic.

The question takes on more force when you hear the rest of Lyles's story — the part that came after he complained of being punched in the face by a police officer.

Three weeks after his nose was broken, Lt. Christopher Nyberg and Detective Paul Southard stopped him near his apartment on Moravia Park Road. The officers ordered Lyles to drop his pants and underwear. He did. They told him to squat and cough. He did — out of fear. Lyles testified that an officer then searched his genitals for drugs and rammed a gloved finger in his rectum. He told jurors the incident wasn’t a "coincidence." He believed the officers were retaliating because he had complained about his broken nose.

"I’m afraid of the police," Lyles told the Sun. "I want to speak out, but it could be dangerous. These people are dangerous."

The bigger cost of police brutality

Stories like Lyles's get around — as do the stories that, unlike Lyles's, end with someone in jail or in the hospital, and with no court-ordered payout. If you lived in Baltimore, had little experience working the law to your advantage, and lacked the money to hire a powerful lawyer, how likely would you be to go to court against a cop who beat you? How much would you want to risk retaliation from men with guns, with cuffs, with backup, with the power to make your life hell?

And how much would you hate the police for making you feel so powerless?

The real cost of police brutality isn't found in court-ordered payouts and billable hours. It's in the deep mistrust between the community and the cops who serve it. It's in the resentment, the anger, the fury that proves dry kindling when police strike the wrong match.

We don't know what happened when the police arrested Freddie Gray, who died of a spinal injury in police custody. But the anger driving the protests in Baltimore began before Freddie Gray. It began with a community that feels mistreated, even brutalized, by its police force. It began with a community where 51 percent of working-age adults don't have a job, where a third of residential properties are either vacant or abandoned, where life expectancy is 68 years — equal to that of Laos or Tajikistan, and more than 10 years below the United States average.

"It’s from years and years of taking shit," one resident told BuzzFeed's Joel Anderson. "Now we’re at a point where people just don’t give a fuck."

Watch: Why it's so rare for police officers to be charged and convicted