The five homes were all operated by Skyline Healthcare, which regularly failed to make payroll and pay the homes’ bills.

Now, Massachusetts attorney general Maura Healey has successfully petitioned a state court to appoint a receiver.

According to the petition, the homes’ outstanding payments add up to hundreds of thousands of dollars. The homes owe food vendor Sysco, a medical records company, a temporary staffing agency and more. Two homes have been without phone service for weeks; the others are at risk of losing service this week, according to the petition.

More than 20 nursing homes have closed in Massachusetts since the beginning of 2018. The rise of other forms of senior care — like in-home care and assisted living — are partly to blame for the downturn in the industry, says John Whitman, a professor at the Wharton School who specializes in the industry.

“You have competition from every angle you can think of,” Whitman said. “That’s why so many of these companies have closed or entered bankruptcy. And I think we’ll see more bankruptcies in the next year.”

In the meantime, residents are the five homes are moving out. Massachusetts’ Department of Public Health says there are more than 5,000 open beds at homes across the state.