According to Baltimore city prosecutors, Freddie Gray ended up dead in part because police officers illegally exploited their powers to seize and detain even innocent citizens.

This week, one of the six officers charged in the case pushed back on that claim, demanding that prosecutors prove that the arrest of Mr. Gray was incorrect. At issue is whether the small, spring-assisted pocket knife Gray was carrying is actually illegal.

The debate over why Gray ended up in police custody – where he suffered a fatal neck injury – speaks to a primary grievance echoed in protests from New York to Baltimore in recent months: that laws intended to protect everyone are often used to hassle certain citizens, but not others.

The string of fatal police encounters that have begun from infractions such as jaywalking in Ferguson, Mo., and selling cigarettes in Staten Island is raising questions about the limits of police power. The incidents have highlighted the claim that the level of deference shown to police by both American society and the courts has had a negative effect on relations with poor communities.

Courts have given police officers “fair leeway” to make mistakes in their enforcement of the law, including a United States Supreme Court decision on the subject in December. This is necessary “for enforcing the law in the community’s protection,” the high court said.

But the concern raised in Baltimore is that this power has been abused during the tough-on-crime era that emerged in New York in the 1990s and spread nationwide.

“The problem is, when we expand an officer’s right to intrude into our lives, there’s always the question of the appropriate use of discretion,” says Rob Kane, a criminologist at Drexel University in Philadelphia who specializes in police authority. People “are taking pause [after Freddie Gray's death] ... because social science evidence shows that police are going to be most prone to abuse that discretion in disenfranchised neighborhoods.”

Knives have been a favorite target for police under political pressure to clean up the streets, argues Jon Campbell of the Village Voice. Seizing a particular kind of knife has been a cornerstone of New York City’s “stop and frisk” policy, which allows officers to frisk anyone who they reasonably think might be breaking the law.

In an earlier article, he notes:

About 80 percent of weapons recovered under stop-and-frisk were knives, according to an analysis of the department's own statistics. And experts say the vast majority of those were likely misclassified as [illegal]. Whether deliberate or not, dramatically expanding the definition of an illegal knife has not only landed thousands of innocent people in jail – it also had the effect of making stop-and-frisk appear far more effective than it actually was.

In 2013, Bill de Blasio ran for mayor of New York on a platform of reforming stop and frisk. He won with strong support from minority communities.

Meanwhile, in the mid-2000s heyday of zero-tolerance policing in Baltimore, 1 in 3 arrests were thrown out by prosecutors for having "insufficient evidence," according to state attorney data compiled by the American Civil Liberties Union for a 2006 civil rights lawsuit. The ACLU suit didn't compare the data with other cities, but at the time a senior ACLU attorney in Maryland called the numbers "unmatched by any other city that I know of."

For her part, Maryland state prosecutor Marilyn Mosby has said that Gray’s knife was legal. Maryland and Baltimore law prohibit “automatic” knives such as switchblades. Gray’s knife was described by police as a “spring-assisted” folding knife, meaning that it’s not “automatic” but that the folding blade has to be partially moved via a thumb tab before the spring completes the opening motion.

Admittedly, there is widespread confusion across America about which knives are legal. In the past four years, 11 states have ended bans on the kinds of new folding knives carried by Gray.

The Baltimore police union says the officers in the Gray case acted correctly and did nothing to unduly harm him while he was in custody. The union suggests that the prosecution rushed to judgment in a case that amounts to a tragic accident.

The officers’ argument, at least regarding the arrest itself, has merit, legal experts say.

Under the current legal standard in the US, “it seems reasonable to allow police officers to make errors of law when trying to decide whether a person’s behavior or instruments they possess are illegal,” says Professor Kane.

Officer Edward Nero, who helped capture the fleeing Gray, filed motions on Monday for prosecutors to present the knife for inspection. He argues that it is illegal, negating the false imprisonment charge against him. (He’s also been charged with assault and misconduct in office.) Up to this point, prosecutors have declined demands from the Associated Press to release pictures of the knife.

But in the end, the charges of illegal imprisonment, may not hinge on the details of Maryland’s knife law. Instead, the question may be one of whether officers are legally liable for knowing the exact wording of laws. Even if objective observers would declare Gray’s knife legal, “is it still unreasonable for the officer to think that it could be an illegal knife? That’s a close call,” says David Gray, a professor at the University of Maryland School of Law.

In Heien v. North Carolina, the Supreme Court ruled in December that US cops are allowed to make such “reasonable mistakes of the law.” A motorist was mistakenly pulled over for having one brake light out, even though that was legal under state law. A search of the car found cocaine.

The motorist claimed police had no reason to pull him over. The Supreme Court sided with the officer. “The question here is whether reasonable suspicion can rest on a mistaken understanding of the scope of a legal prohibition,” Chief Justice John Roberts wrote for the court in the 8-to-1 decision. “We hold that it can.”

In her dissent, Justice Sonia Sotomayor asked where that left everyday citizens: “One wonders how a citizen seeking to be law-abiding and to structure his or her behavior to avoid these invasive, frightening, and humiliating encounters [with police] could do so.”