Corinthian Colleges announced on Monday that it had reached an agreement with the U.S. Department of Education that is designed to keep the for-profit chain afloat long enough to sell off and shutter its campuses in an orderly fashion.

The struggling Corinthian faces a dire cash shortage, due in part to a decision by the feds last week to put a 21-day hold on payments for federal financial aid and grants. While the hold remains in place, the department agreed to release $16 million in immediate payments. That was the minimal amount necessary to keep Corinthian from going bankrupt this week, according to a corporate filing.

The department said it struck the deal to prevent the company’s “immediate closure” and the resulting disruption to students and employees, according to a written statement.

Corinthian owns Heald College, WyoTech and the Everest College and University chains. It enrolls 72,000 students. With annual revenue of $1.6 billion, it is one of the largest publicly traded for-profits.

The company will continue to enroll new students under the agreement. However, Corinthian agreed to freeze enrollments at institutions it is closing down, once the company and the government determine which campuses those will be.

Last month Corinthian said it was considering "strategic alternatives" such as the sale or merger of some of its operations. The crisis accelerated that process, and Corinthian apparently will now cease running its three chains.

The department and Corinthian are working on a more complete transition plan, which is slated to be finalized by July 1. Then the company will have approximately six months to seek to sell or "teach out" its 107 campuses.

Students at shuttering campuses who are unable to complete their studies would have their federal loans discharged, according to the department’s policies. The company received $1.4 billion in federal aid and grants last year.

Corinthian agreed to hire an outside monitor during the phasing-out process. According to the preliminary agreement, the third-party auditor “will have full and complete access to Corinthian personnel and budgets, including financial forecasts, results of operations and cash receipts and disbursements.”

The company only had a few days of cash on hand. And it had serious problems before this recent drama, with a $55 million cash hole earlier this year.

As a result, Corinthian officials had little bargaining power in their negotiations with the department. But both sides apparently wanted to avoid the worst-case scenario of students being locked out of campuses this week.

"Throughout several days of intensive discussions with the department, our goal has been to protect the interests of our students, 12,000 employees, taxpayers and other stakeholders," said Jack Massimino, the company's chairman and CEO, in a written statement.

Corinthian said in a corporate filing that it would need to find more money to stay viable during the teach-out and sell-off. And the company will seek a softening of the 21-day delay in federal payments.

The department said it imposed the hold on Corinthian's money because the company had been slow to respond to several information requests over concerns about the company's marketing practices. Corinthian agreed on Monday to provide the outstanding information in a timely manner.

“We will continue to closely monitor the teach-out or sale of Corinthian’s campuses to ensure that students are able to finish their education without interruption and that employees experience minimal disruption to their lives,” Ted Mitchell, the U.S. under secretary of education, said in a written statement.

The company faces a raft of regulatory and legal challenges, some of which will likely persist beyond the unloading of its three chains.

Corinthian is being sued by attorneys general in California and Massachusetts over allegations about deceptive marketing and inflated job placement claims. The Consumer Financial Protection Bureau is also investigating the company.