One man was walking home with groceries. Another was on a break from his job at a meat market. A third was walking down the street listening to headphones.

That is when the men say police officers confronted them, sometimes violently, searched their clothing and discovered small amounts of marijuana, according to a federal civil rights lawsuit that is expected to be filed on Thursday in United States District Court for the Southern District, in Manhattan.

The lawsuit, filed on behalf of five Bronx men, contends that New York City police officers routinely stop black and Latino men without cause and then charge them with low-level misdemeanors when their pockets are emptied and small amounts of marijuana are found.

In each of the cases, the amount of marijuana found on the men would have amounted to little more than noncriminal violations punishable by a fine of up to $100 for first-time offenders. But the lawsuit contends that the charging officers falsely claimed the marijuana was in public view, making it a low-level misdemeanor under Section 221.10 of the New York Penal Code, which allows for sentences of up to three months in jail.

Critics of the Police Department say the practice, which they call manufactured misdemeanors, is widespread. The arrests are often the outgrowth of the department’sstop-and-frisk program, which is being challenged in federal court for, among other things, disproportionately targeting black and Hispanic men.

The lawsuit names the city, the department and several officers and supervisors as defendants. It was filed by the Bronx Defenders, which represents low-income defendants, and the law firm of Emery Celli Brinckerhoff & Abady L.L.P. A similar lawsuit filed by the Legal Aid Society is pending in state court in Manhattan.

A spokeswoman for the city’s Law Department declined to comment on Wednesday, saying the city had not yet been served with the lawsuit.

The Police Department charged more than 50,000 people with marijuana misdemeanors in 2011. More than 84 percent were black or Hispanic, a disparity that is even more pronounced in the Bronx.

In an effort to limit these arrests, Gov. Andrew M. Cuomo has made decriminalizing small amounts of marijuana in open view one of his top goals this legislative session. The Legislature failed to act on a similar measure last year, despite support from Mayor Michael R. Bloomberg and the police commissioner, Raymond W. Kelly.

Though state law calls for misdemeanor cases to be tried within 60 days, the time limits are seldom met, the lawsuit contends. People arrested in the Bronx have it even worse; a recent series of articles in The New York Times revealed a dysfunctional justice system plagued by long delays that often make it all but impossible for people charged with misdemeanors to ever reach trial. Two of the plaintiffs in the lawsuit, Francisco Zapata and Danilo Melendez, were featured in one of the articles. They endured long delays and made frequent court appearances waiting for trial before the charges against them were finally dropped.

A version of this article appeared in print on May 2, 2013, on page A20 of the New York edition with the headline: Federal Suit Claims Police Distorted Marijuana Searches to Create Misdemeanors.