The adult units at Westwood Lodge had been cited for not having enough staff and for not properly monitoring patients.

Just four weeks after clearing it to accept new patients, the state has closed the troubled Westwood Lodge psychiatric hospital, citing “critical safety issues.’’

The Department of Mental Health ordered the hospital closed on Friday, and all 20 adult patients were transferred to other facilities.

The department’s statement to The Boston Globe did not provide details on what prompted it to shut down the hospital. But an employee who did not want to be identified said there were allegations that a male patient sexually assaulted a female patient in her room Wednesday night.

Westwood police and the Norfolk district attorney’s office declined to comment, but the mental health department confirmed it is investigating “an alleged incident that recently occurred at Westwood Lodge.’’

Safety lapses occurred despite assurances by the department that it was closely supervising the hospital — and promises by Westwood Lodge executives that the treatment facility had emerged from its recent problems “as a stronger organization.’’

In June, a Globe review found that the seven Massachusetts psychiatric hospitals owned by Arbour Health System, including the 89-bed Westwood Lodge, have repeatedly and sometimes egregiously shortchanged patient care while reaping robust profits.

Conditions in the Westwood Lodge children’s unit have been particularly troubling, with children at one point sleeping on bare plastic mattresses in filthy rooms, children injured during fights and by broken glass, and one boy given the wrong medication for nine days, the Globe reported. The children’s unit has been closed since April 26.

The adult units at Westwood Lodge also have been cited for not having enough staff and for not properly monitoring patients. A 32-year-old Lowell man, Michael Bakios, died in his bed two years ago when staff did not check on him every five minutes as required. The oxygen equipment they tried to use to revive him was broken. Admissions to the adult and adolescent units were suspended May 12 after inspectors found continued problems.

But on July 31, state mental health regulators decided to give the hospital another in a long series of chances. They said an external monitor had been working with Westwood Lodge for seven weeks and documented improvements, which were confirmed during two inspections. The hospital had filled key leadership positions and hired more doctors and nurses, the state said. Regulators allowed it to gradually begin admitting adult patients again.

Dania O’Connor, the hospital’s chief executive, told the Globe in an e-mail at the time that Westwood Lodge renovated patient units and nursing stations, strengthened programming, and improved treatment plans. “We are confident that these improvements will be positively received by patients and their families, as well as by our dedicated staff,’’ she said.

Yet, on Friday, the hospital once again found itself sidelined — this time permanently. “The Department of Mental Health made the decision to close the Westwood Lodge effective August 25, 2017, due to issues of patient safety, quality of care, and the facility’s failure to comply with DMH requirements,’’ spokeswoman Daniela Trammell said in an e-mail to the Globe.

The problems occurred despite the presence of an external monitor on site at the hospital two or three days a week.

Westwood Lodge shares a joint license with two other Arbour facilities, Pembroke Hospital and Lowell Treatment Center. The mental health department said it will work with Arbour to continue operations of these two facilities.

Arbour has long defended its record, saying it cares for some of the state’s most challenging patients, many of whom other hospitals turn away. It is the largest provider of psychiatric care in Massachusetts , and is owned by Universal Health Services, the biggest psychiatric hospital company in the country. Universal is facing fraud investigations in numerous states.

The mental health department also has defended its decision to give the Arbour hospitals numerous chances to improve, saying that regulators have been a near-constant presence in the facilities. Between January 2015 and last week, the state has inspected the Arbour facilities on 91 occasions, the agency said. That compares to 116 inspections for the state’s 60 other psychiatric hospitals.

The state Medicaid program pays Arbour more than $100 million a year, fueling its growth into an indispensable provider of mental health care in a system desperately short of psychiatric beds.

Federal inspectors have found problems at the hospitals, too. Earlier this month, the federal government said it planned to fine the Lowell facility $207,000 for failing to follow through on promises to correct workplace safety violations. The Occupational Safety and Health Administration said it entered into an agreement with the hospital in April 2016.

But when inspectors returned early this year, they found the hospital had not complied with the agreement, they said. Between December 2016 and April of this year, at least three employees were seriously injured by patients, including a nursing supervisor who suffered a concussion and a case manager who was repeatedly punched and scratched, requiring treatment for a scratched cornea and a head injury.

The agency wants the hospital to improve measures to prevent violence, including eliminating confined work areas where staff can be trapped by patients, and providing staff with more information about patients with a history of assault. Lowell Treatment Center is contesting the findings, according to Arbour Spokeswoman Judy Merel. “OSHA’s characterization that Lowell Treatment Center failed to abate the prior citation is inaccurate,’’ she said in an e-mail.

Liz Kowalczyk can be reached at Follow her on Twitter @GlobeLizK.