U.S. District Judge Landya McCafferty allowed the state and hospitals to determine their own timeline for ending the practice.
State officials say they will need up to two years to end the practice, while the group of hospitals wants the state to stop ER boarding within one year.
The state says that the lack of beds for behavioral health patients and a labor shortage make the longer timeline necessary.