New York City is on the hook for hundreds of millions of dollars in payments to former detainees at jails on Rikers Island and other city lockups who were held for hours — and sometimes longer than a day — after bail was posted for their release.

In settling a 2017 class-action lawsuit, the city agreed to make payments of $3,500 for every instance between October 2014 to October 2022 that a detainee was not released within three hours after bail was paid, as mandated by law, according to a filing in federal court in Manhattan. Given that bail was posted about 94,000 times during that time, affecting nearly 72,000 people, the city could make payments exceeding $300 million.

“From our analysis of the city’s records, it seems that nearly everyone’s release was delayed over three hours,” said Debbie Greenberger, an attorney with law firm Emery, Celli, Brinckerhoff, Abady, Ward and Maazel.

“It can be really traumatic for a lot of people’s lives," Greenberger said. "People can lose their jobs when they don’t report to work. People can have issues with their children when they’re not there when the bus is coming when they’re supposed to pick up their kids. People can miss medical appointments. It’s important that when bail is paid people are released promptly.”

The reasons for the delays in releasing people, according to the suit, include malfunctioning computers and fax machines, unavailable staff and detainees prematurely transferred from court to jail for prolonged processing before bail payments were accepted.

The city Department of Correction did not admit liability, court papers show, but said it is fixing the problems addressed in the suit.

"The department for decades has operated on antiquated systems and processes to run our jails in the 21st century and the settlement of this lawsuit brings closure to that era," a spokesperson, Latima Johnson, said in an email. Johnson said last year, the department implemented a "bail-tracking system" to expedite the release of people from detention after bail is posted. The suit covers delayed releases through last month.

The city signed the settlement agreement last month, but it has yet to be finalized by a judge, Greenberger said. A website allowing those formerly detained who say they were not released on bail within three hours of payment can find more information at NYCBailSettlement.com, which goes live in December.

Compensation checks are expected to be issued by the fall.

The settlement was first reported Tuesday by The New York Times.

This story has been updated with additional comment.