North Adams Regional Hospital evicted dozens of nurses and supporters from a dining hall Friday afternoon and closed the emergency department — its last remaining operation — after a state judge amended a restraining order that had required it to remain open.

The shutdown came amid growing disagreement and acrimony among hospital leaders, employees, and regulators, who couldn’t agree on a plan to keep the emergency room open through the weekend.

That prompted state Attorney General Martha Coakley’s office to request that Berkshire Superior Court Judge John A. Agostini allow the hospital, which halted all inpatient services in the morning, to also shut the emergency room if it couldn’t be operated safely.

Talks between lawmakers, state health regulators, and leaders of the North Adams hospital and Berkshire Medical Center in Pittsfield — which was supposed to take over running the North Adams emergency room — failed to hammer out a plan on how to fund emergency operations and establish a workable system that could quickly be put in place.

Matthew Cavanaugh for The Boston Globe

Employees and supporters held a rally and a moment of silence Friday.

Coakley said she wanted the emergency department to reopen as soon as possible, likely under Berkshire Medical, which must still receive a license from the state Department of Public Health. But it was not clear when emergency services would be restored, if at all.

The attorney general said she was launching an investigation into the North Adams hospital board and why financial conditions deteriorated so quickly at the 109-bed hospital, which has treated patients at nine rural communities in northwestern Massachusetts since 1883.

“I am deeply troubled by the rapid closure of this hospital,” Coakley said in a statement. “The harmful impact on the employees and on the accessibility of health care for the people of these communities is unacceptable.”

At the North Adams hospital, which had been the largest employer in the small city, there were “angry protesters on the hospital campus and local police and Berkshire County Sheriff have a strong presence," according to Paul Hopkins, who has been its director of community relations.

More than 500 employees of the hospital and affiliated operations lost their jobs when it closed Friday morning.

Hopkins said hospital officials allowed the protesters, mostly nurses and their supporters, to occupy the main dining room earlier in the day, and about 30 were still there Friday afternoon.

“The community has already been through a traumatic experience, and now they want to take away their emergency department,” said David Schildmeier, spokesman for the Massachusetts Nurses Association.