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.