A superior court judge has ruled Governor LePage doesn't have the authority to close the facility without first gaining legislative approval.
The justice has granted a temporary injunction that was sought by the Maine Attorney Generals Office and others.
Lepage wants to close the facility as a way to save money and sparked controversy last month when he ordered the prisoners and staff to be removed. That happened even though the prison had been funded through the summer and lawmakers were seeking more.
Lots of people in Downeast Maine depend on the prison for jobs and for the impact it has on the local economy.
It's unclear at this point how the injunction will impact the effort to keep it open.