People wait in line to refill oxygen bottles in Jakarta, Indonesia, on July 5. (Dimas Ardian/Bloomberg News)

Dozens of patients died when a public hospital on the island of Java nearly ran out of oxygen over the weekend, underscoring dire oxygen shortages in parts of Indonesia as the island nation suffers from a major coronavirus outbreak.

Sixty-three patients died between Saturday and early Sunday at the Dr. Sardjito General Hospital in Yogyakarta city, CNN reported, citing a statement released by the hospital.

The hospital’s oxygen supply was replenished as of early Sunday morning. But the episode highlighted the strain Indonesia’s hospitals are experiencing amid a variant-driven surge of infections and a sluggish vaccination campaign. Indonesia’s geography — consisting of a string of islands between the Pacific and Indian oceans — has also complicated the distribution of critical medical supplies, including oxygen.

“Due to an increase of three to four times in the amount [of oxygen] needed, the distribution has been hampered,” said Luhut Binsar Pandjaitan, the coordinating minister for maritime affairs and investment, according to the Associated Press.

The deadly shortage in Yogyakarta came after Health Minister Budi Gunadi Sadikin said last week that the government had guaranteed oxygen for covid-19 patients. He also told CNBC that Indonesia had “learned from our neighbors” about the threat of oxygen scarcity and that the country had capacity to ramp up oxygen production.

However, oxygen “is not well spread,” he said, “because the factories are mostly located in west Java and east Java, not in central Java. That is where … we see the lack of oxygen, because of distribution issues rather than supply issues.”

Scenes of overwhelmed hospitals and desperate struggles to procure oxygen in nearby India in the spring served as a warning to neighboring countries that are now experiencing their own severe outbreaks.

Coronavirus has crushed India’s health system. Patients are on their own.

The Sardjito hospital said in a statement that it had sought more oxygen for days before its supplies almost ran out, but that the number of virus patients over the weekend had overwhelmed the hospital, CNN reported.

The Red Cross warned last week that Indonesia was “on the edge of a COVID-19 catastrophe” and that its health system was headed toward collapse. By the end of June, hospitals were turning away critically ill patients and oxygen prices had more than doubled as residents sought out scarce oxygen canisters for sick relatives, Al Jazeera reported.

Officials said Monday that the government has asked oxygen producers to dedicate their full supply to medical use and that Indonesia would import oxygen if necessary, according to the AP. Sadikin also told lawmakers Monday that the health ministry had established a special unit dedicated to addressing oxygen supplies in hospitals as cases spike on Java and the island of Bali.

Sadikin said the government is encouraging people with mild symptoms to be treated at home “because hospitals are full,” Bloomberg News reported. New restrictions on mobility took effect over the weekend, and CNN reported that additional limits on the entry of foreign travelers will start Tuesday.

Indonesia, the world’s fourth most populous country, recorded 27,333 new coronavirus cases and 555 deaths on Sunday. Officials said travel for the Eid al-Fitr holiday in May and the spread of the highly infectious delta variant contributed to the surge in recent weeks. The country’s vaccination program is also struggling: Indonesia has fully inoculated only about 5 percent of the population of more than 270 million so far, mostly using the Chinese Sinovac vaccine.

White House national security adviser Jake Sullivan said Friday that the United States would ship 4 million doses of the Moderna vaccine to Indonesia through the Covax program “as soon as possible.”

Infections among children in Indonesia have spiked, worrying advocacy organizations. Children account for around 12 percent of total cases, according to Save the Children — a rate that is among the world’s highest.

“We desperately need more vaccines — that’s the bottom line,” Dino Satria, chief of the Humanitarian and Resilience Program at Save the Children in Indonesia, said in a statement Monday. “We hope the international community is listening. Without urgent action, many more children and adults will die.”

Coronavirus: What you need to know

Covid isolation guidelines: Americans who test positive for the coronavirus no longer need to routinely stay home from work and school for five days under new guidance planned by the Centers for Disease Control and Prevention. The change has raised concerns among medically vulnerable people.

New coronavirus variant: The United States is in the throes of another covid-19 uptick and coronavirus samples detected in wastewater suggests infections could be as rampant as they were last winter. JN.1, the new dominant variant, appears to be especially adept at infecting those who have been vaccinated or previously infected. Here’s how this covid surge compares with earlier spikes.

Latest coronavirus booster: The CDC recommends that anyone 6 months or older gets an updated coronavirus shot, but the vaccine rollout has seen some hiccups, especially for children. Here’s what you need to know about the latest coronavirus vaccines, including when you should get it.