Two New Orleans men who say they spent months in jail past their release dates filed a federal lawsuit Thursday against the state Department of Public Safety and Corrections as well as the Orleans and East Carroll Parish sheriffs' offices.

Jessie Crittindon and Leon Burse were held five months longer than they should have been at the River Bend Detention Center in East Carroll Parish after they accepted plea deals in Orleans, according to their lawsuit.

The men pleaded for their release for months but were freed only after lawyers from the MacArthur Justice Center of New Orleans intervened, they said.

“One of the most basic rights we have as citizens of this country is personal liberty,” said Katie Schwartzmann, the co-director of the nonprofit law firm. “The government cannot lock a person in jail without a valid court order. To deprive these men of five months of their lives — hours they would have spent with their families and loved ones — is unconscionable.”

The men are seeking unspecified financial damages as well as a court order preventing future cases of “overdetention.”

State Secretary of Corrections Jimmy LeBlanc, Orleans Parish Sheriff Marlin Gusman and East Carroll Parish Sheriff Wydette Williams are among the defendants in the suit, which was filed in U.S. District Court in Baton Rouge. It has been assigned to Judge Shelly D. Dick.

Crittindon, 30, pleaded guilty in Orleans Parish Criminal District Court on Aug. 2, 2016, to aggravated burglary, two counts of simple criminal damage to property and simple burglary. He should have been released immediately under a deal with prosecutors, according to his lawyers.

Burse, 44, pleaded guilty to attempted possession of heroin on Aug. 8, 2016, and was also set to be freed.

Yet instead of the immediate release to which they were entitled, both men were sent back to the River Bend Detention Center in East Carroll Parish and kept there, according to the lawsuit.

The Orleans Parish Sheriff's Office has sent hundreds of inmates to the remote parish, which is closer to Memphis, Tennessee, than to New Orleans, over the past several years because of a severe staffing shortage.

Although the men were housed in a parish jail, they were technically state prisoners because they had been sentenced.

The men sat in legal limbo for months because the state Department of Public Safety and Corrections failed to calculate their proper release dates, according to the suit.

Crittindon’s mother pleaded with officials at the Orleans and East Carroll Parish sheriff’s offices, as well as with state corrections officials, for his release for months. Burse filed grievances in East Carroll and with the state, the suit says.

But no one acted on the men’s cries for help until January, according to the lawsuit. That is when the MacArthur Justice Center stepped in on their behalf by filing a lawsuit for Crittindon and bringing Burse’s case to officials' attention. The men were released in short order, according to the lawsuit.

All three agencies share responsibility for the missteps that led to the men's “overdetention,” according to the lawsuit.

Schwartzmann said her firm has received complaints from several other inmates about similar predicaments.

“We still don’t definitively know what caused it or how many people were affected,” she said. “It’s really alarming that this happened. I can’t explain it. You have three different entities here who were involved in the continued housing of people who very clearly should have been out of jail.”

The Orleans Parish Sheriff’s Office promised to “vigorously defend” itself but declined further comment.

A spokesman for the Department of Public Safety and Corrections declined to comment.

Williams, the East Carroll Parish sheriff, did not respond to a request for comment.

Follow Matt Sledge on Twitter, @mgsledge.