SEOUL — The windows are sealed shut in the psychiatric ward at South Korea's Daenam Hospital to prevent possible suicide attempts. The patients sleep together on futons in communal rooms.

When the coronavirus made its way inside earlier this month, the hospital administrators and South Korean health officials faced a choice.

They decided to put the psychiatric ward — and its more than 100 patients — on lockdown in an attempt to contain the virus at the hospital in Cheongdo County, the center of South Korea's outbreak.

Of South Korea's more than 3,150 confirmed cases, 101 were from patients in the psychiatric ward. Seven patients from the ward have died — among a total of 17 around the country. All but two in the psychiatric ward contracted the disease.

For South Korea's public, the actions by the hospital overseers touch on difficult issues of ethics and efficacy as the country struggles to cope with the growing health crisis. South Korean officials have vowed not to follow China and impose sweeping citywide lockdowns.

But the hospital cases have underscored the challenges facing health-care institutions, nursing homes and other live-in settings if the coronavirus flares.

South Korean health authorities announced Thursday that the remaining patients will be transferred from the ward at Daenam Hospital.

The decision “entailed a lot of agony,” said Jung Eun-kyeong, the director of South Korea’s Centers for Disease Control and Prevention.

But Jung said it was inevitable since it was hard to find a place where their viral infection and mental health conditions could be treated at the same time.

Still, the lockdown has faced questions. The hospital’s inpatient psychiatric unit was a perfect breeding ground for the virus, according to the panel of doctors from South Korea’s National Medical Center (NMC).

The panel’s report, released Wednesday, said the closed windows deprived the ward of much-needed ventilation. Hand sanitizer could not be left in the open because of the risk that patients could drink it. For the sake of constant patient observation, even bathrooms were not compartmented.

“Once a virus enters the locked ward, it easily gets very transmissive,” Lee So-hee, lead psychiatrist at the NMC, told reporters. “Given how the inpatients already had their immune system weakened, the infection could take a serious toll on them.”

Baik Jae-joong, lead pulmonologist at Green Hospital in Seoul, said the health authorities should never have locked the virus patients into the ward.

“They were basically left to die inside,” Baik said. “The patients were quarantined into the same environment that got them infected. It was a medical disaster and an ethical no-no.”

Kim Sung-yeon, director of Solidarity Against Disability Discrimination, said one of the patients at Daenam could “escape the ward only through death” after 20 years of hospitalization there. Kim said the patient weighed 93 pounds at the time of his death.

Kwon Jun-wook, vice director of KCDC, said Saturday that Daenam Hospital’s coronavirus patients who died had poor health conditions because of long hospitalization. According to the KCDC, the total number of coronavirus cases traced to Daenam Hospital is now at 119, including medical workers.

Daenam Hospital said in a statement that it was still investigating how the virus entered the locked psychiatric ward.

Local media reports said members of a fringe religious group who had contracted the virus attended a funeral at the hospital complex last month. Nearly half of South Korea’s coronavirus cases are traced to the group, known as Shincheonji Church of Jesus.

Daenam Hospital said that the church leader’s brother died at the hospital last month and that his funeral was held at the basement of the hospital on Feb. 2. The patients at the psychiatric ward started displaying symptoms related to the virus in mid-February, the statement said.