A rally with outside the Baltimore courthouse during court proceedings on Sept. 10 in the Freddie Gray case. (Barbara Haddock Taylor/Associated Press)

My parents taught my brother and me to respect the police. We once lived on the same West Baltimore street where riots broke out after the death of Freddie Gray, who was injured in police custody on April 12. Gray was unconscious when a police van transporting him for booking arrived at the police station. He died one week later from spinal cord injuries. Gray’s death sparked protests in Baltimore and other cities.

After getting a law degree, I returned to Baltimore and became an assistant state’s attorney, a black female prosecutor among many white male prosecutors. That’s when I began work on the assembly line that is the United States’ criminal justice system, in the same office that later charged six officers in Gray’s death.

For nearly five years as a prosecutor, I was in courtrooms almost every day. The prosecutor’s office is like a factory. The wheels of justice spin with little regard for how things work.

Police officers were my witnesses in a criminal justice system that disproportionately targets black males. Most weekdays, the large Baltimore courtrooms overflow with black men. It is as though white people don’t commit crimes. Back then, I didn’t analyze the consequences of what police do that fosters deep distrust in the African American community.

In Baltimore’s misdemeanor crime unit, most charges are brought for petty theft, shoplifting, minor assaults, minor drug offenses, illegal handgun possession, drunken or impaired driving, or disorderly conduct. The majority of all criminal cases are misdemeanors. While Baltimore’s black population hovers around 64 percent, an American Civil Liberties Union study found that 92 percent of the city’s marijuana possession arrests in 2010 were of African Americans. That 2013 study claims that blacks and whites use marijuana at about the same rate, yet I rarely saw white defendants. The pervasive feeling in the African American community is that the Baltimore police single out black men by following, stopping and arresting them.

It was my job to review police officers’ sworn statements to obtain charges. These documents are supposed to describe facts leading to each arrest. Often they lacked uniqueness, reading instead as though they were taken verbatim from charges filed against others.

I was struck by how frequently simple arrests had no probable cause. Charges of loitering, disorderly conduct or failing to obey police were often stand-ins for “little else to go on.” It was difficult to know whether officers misunderstood and therefore misapplied the law or knew the law and failed to correctly apply it. Did they purposefully misapply the law to arrest more black men than anyone else? The result was the same. Police frequently arrested black people without probable cause. Some cases were dismissed, but in most cases, the arrest records remained.

I felt powerless to change this system. As with many lawyers beginning a career, my goal was to obtain trial skills and advance. Rocking the boat is not conducive to promotion. But the experience helped me make a quick decision when my brother recently had a medical emergency while driving in Baltimore.

My brother, who is black, more than 6 feet tall and 260 pounds, was able to stop his vehicle and call me. But he was disoriented and confused, clearly not himself. While on the phone, he saw a police car and asked me whether he should flag the officer and ask for help.

Concerned that the police would arrest him rather than help, I said no.

If the criminal justice system is going to address racial inequities, it must start at the leadership level. The lower assembly-line prosecutors cannot make policy changes. Top prosecutors must take a serious look at how we prosecute crime, who gets prosecuted and why.

If we keep doing the same thing, distrust in the police and the system will continue. And more Freddie Grays will get arrested, go to jail or die at the hands of police.

The writer, a trial lawyer, is a former prosecutor.