Reversing a ban that lasted nearly a month, Pennsylvania health officials announced Monday that hospitals may once again perform non-emergency surgeries, as long as those procedures don’t jeopardize their ability to respond to the COVID-19 pandemic.

State Health Secretary Dr. Rachel Levine said that the new policy followed recommendations from national associations representing hospitals, physicians and nurses, and comes as COVID-19 is putting fewer demands on the state’s healthcare infrastructure.

Roughly 2,900 patients across Pennsylvania were hospitalized due to COVID-19 as of noon Monday, but nearly half of the state’s hospital beds, 40 percent of its intensive care unit beds and 70 percent of its ventilators were not in use, Levine said.

The Department of Health ordered hospitals on April 1 to stop elective surgeries in order to ration medical equipment and manpower to treat a surge of COVID-19 patients.

The policy dealt a financial blow to hospitals, and some facilities continued to schedule non-emergency surgeries anyway. But Levine said Monday that the prohibition allowed Pennsylvania’s hospitals to meet the needs of COVID-19 patients when cases surged in the state earlier this month.

The guidance the Department of Health issued Monday allows hospitals to resume the surgeries at their own discretion, as long as the procedures don’t jeopardize ”the safety of patients and staff or the [facility’s] ability to respond to the COVID-19 emergency.”

Levine said the agency is also urging hospitals to test patients for COVID-19 once they’re admitted for a procedure.

Hospitals that want to resume elective surgeries must report data to the Department of Health, but don’t need the agency’s permission to begin operations.

The new policy drew praise from hospital trade groups on Monday, including the The Hospital and Healthsystem Association of Pennsylvania.

“[We] look forward to continuing to work together with the Wolf Administration to ensure we are achieving the right balance between reducing COVID-19’s incidence and expanding access for Pennsylvania patients to essential health care services, including non-emergent surgeries and procedures,” association president Andy Carter said in an emailed statement.

The Wolf administration also announced Monday that some outdoor spaces and recreational businesses, including golf courses, marinas, privately owned campgrounds and guided fishing trips, could reopen on May 1. State park campgrounds will remain closed until May 14.