An explosion at a dry dock in New York City's Staten Island killed one person and injured 36 others on Friday, as the blast occurred while firefighters were on the scene responding to a fire and attempting to rescue two people who were trapped, officials said.

Two firefighters were hospitalized, including a fire marshal who suffered a fractured temple and a brain bleed and was intubated, officials said. The other firefighter was in serious condition but had shown improvement, officials said.

"Today, a fire broke out on Richmond Terrace on Staten Island, followed soon after by reports of an explosion," New York Mayor Zohran Mamdani said in a statement.

"What unfolded was a fast-moving emergency that claimed one life and left more than 30 civilians and first responders injured. The fire is now under control," he added.

Officials did not provide details about the person who died except to say it was a civilian.

Mamdani opens investigation over explosion

A comprehensive investigation would begin once the fire was completely extinguished, Mamdani said.

Firefighters had responded to reports of a basement fire, and two workers trapped were on scene when the explosion occurred, officials said.

The incident took place in the Richmond Terrace section of the borough of Staten Island, a part of New York City that is across the harbor from Manhattan.

"We mourn the life that was lost today, and we hold their family in our hearts. Tonight I visited a firefighter in serious condition, as well as the family of a fire marshal who remains in critical condition. I ask every New Yorker to keep those injured, and their families, in their thoughts," Mamdani said.

He also thanked the first responders, pointing out that they put themselves "in harm’s way so others could escape. Our city owes you a debt of gratitude."