A federal judge will hear from Alabama and the U.S. Justice Department on Tuesday afternoon about a proposed agreement over conditions in Alabama’s men’s prisons. Judge Harold Mooty scheduled the hearing after the parties filed their proposal Monday morning, hours before trial was due to begin, the Alabama Reflector reported. The agreement still needs his approval.

The Justice Department sued over violence and sexual abuse among prisoners, excessive force by officers and unsafe living conditions. Under the proposal, Alabama would carry out changes in phases, and federal officials would monitor progress and inspect the prisons.

The Alabama attorney general’s office said the parties jointly filed the agreement in the Northern District of Alabama. The federal lawsuit dates to December 2020.