BOSTON — A group of sex offenders are suing the Massachusetts Department of Correction, alleging prison officials unlawfully detained them after they were ordered to be released from custody.

The Boston Globe ( ) reports lawyers for dozens of convicted offenders filed a civil complaint in U.S. District Court in Boston.

Offenders deemed “sexually dangerous” are held indefinitely at the Massachusetts Treatment Center — run by the DOC — after their prison terms. But they are entitled to trials where a judge or jury can decide that they’re no longer dangerous.

The plaintiffs allege the DOC routinely holds inmates who’ve been ordered freed for a day or more while officials complete the process of notifying agencies of their release.

They’re seeking $5 million in damages.

The DOC says it won’t comment on pending litigation.

Information from: The Boston Globe,