Three weeks ago, the Denver City Council divorced Denver from private corrections companies in city-shaking style. On Monday, they patched things up — at least for now.

The council unanimously approved new contracts with CoreCivic and a GEO Group subsidiary to run some of the city’s halfway houses, or community corrections facilities. The facilities are alternatives to prison.

A majority of council members want to move away from the companies because they run immigrant detention facilities, including GEO’s facility in Aurora. Members also questioned the growing role of private, for-profit companies in the criminal justice system.

Mayor Michael Hancock’s administration shortened the GEO contract to expire at the end of 2019, rather than running a full year. The contract with CoreCivic still will run until next June 30.

And, more broadly, the administration promised later changes.

“We heard the message loud and clear, so we’re moving to distance ourselves from both CoreCivic and GEO,” said Greg Mauro, the city’s community corrections director.

The administration also agreed to create a community advisory group to oversee the transition. Refusing to renew the contracts on Monday could have resulted in the facilities closing, with hundreds of residents sent to prison unless they were granted parole, city and state officials warned.

Lisa Calderón, chief of staff for Candi CdeBaca, said the councilwoman’s office received complaints about food quality and mandatory chores, among other concerns. But Mauro said a city investigation showed one of the most serious allegations about unpaid labor to be unfounded.

Together, the new contracts are worth $8.7 million and mostly are funded by the state. CdeBaca said that the council was pushing the city toward closer oversight and to figure out “how to build our own capacity again to do this work.”