People arrested in the Bronx borough of New York City for low-level offenses such as shoplifting or marijuana possession can wait years for a trial, public defenders and other lawyers complained in a federal lawsuit filed on Tuesday against New York Governor Andrew Cuomo and the state's top judges.

The wait is so long, many people plead guilty just to avoid returning to court again and again, according to the complaint, which says the delays violate a defendant's right to a speedy trial under the U.S. Constitution.

Filed in U.S. District Court for the Southern District of New York by public defenders and law firms Emery Celli Brinckerhoff & Abady and Morison & Foerster, the lawsuit seeks class action status to represent anyone who will face misdemeanor or lesser charges in Bronx Criminal Court. It seeks non-monetary remedies.

RELATED: Female trio wanted for violent assault in the Bronx: NYPD

According to the complaint, delays in the Bronx are far worse than in the rest of city, even though there are fewer misdemeanor filings there than in Manhattan, Brooklyn or Queens. The lawsuit notes that the Bronx is the poorest county in the state and has the highest percentage of residents of color among the city's five boroughs.

"The system more closely resembles punishment than due process," the complaint states, noting reforms have been promised for more than a decade.

In a statement, Lucian Chalfen, a spokesman for New York Chief Judge Janet DiFiore, said "the issue of case backlogs and delays in the state's courts— particularly the Bronx — are an absolute top priority."

DiFiore is a defendant in the lawsuit along with Cuomo and Chief Administrative Judge Lawrence Marks.

As of January, 2,378 misdemeanor cases had been pending in the Bronx for more than a year and 538 cases had not been resolved after two years, the lawsuit claims. The average wait for a jury trial is 827 days.

Last year, there were more than 45,000 misdemeanor arraignments in the Bronx but only 98 misdemeanor trials.

According to the complaint, hundreds of people wait hours each day for cases to be called, only to face further adjournments. Prolonged prosecutions affect people's immigration status, schooling and jobs, the lawsuit says.

State law requires prosecutors to be ready for trial in 90 days of arraignment on a misdemeanor, or less, but court delays do not count toward the limit.

"We are reviewing the complaint," said Dani Lever, a spokeswoman for Cuomo.