LONG BEACH (CBSLA) — A firefighter died of a gunshot wound while responding to an explosion and fire at a Long Beach high-rise residential building for seniors.

The firefighter was identified as Capt. David Rosa, 45. Another firefighter and a civilian were also shot, but their injuries were non-life-threatening.

Rosa was a 17-year veteran of the Long Beach Fire Department, and a captain for the past six years.

It is with deep sadness and tremendous grief that we announce that Captain David Rosa has died from injuries sustained from a gunshot wound he sustained at an emergency incident. Capt. Rosa is a 17 year veteran of our department and is assigned to Station 10. pic.twitter.com/np03fecLQb — Long Beach Fire (CA) (@lbfd) June 25, 2018

Residents say they heard an explosion at the Covenant Manor, 600 E. Fourth St., in Long Beach at about 3:40 a.m. that blew out some windows and spread the smell of gasoline. As firefighters quickly put out the fire, gunshots rang out.

“We had two firefighters who were shot,” Long Beach Fire Chief Mike DuRee said. “I’m saddened to report as of right now, fire Capt. Dave Rosa … was killed in the line of duty this morning while he responded to that structure fire.”

Rosa leaves behind a wife and two children.

The second firefighter, 35-year-old Ernesto Torres, was grazed by the gunfire and has been released from a hospital.

Long Beach police said authorities have arrested Thomas Kim, 77, a resident of the senior home, in the killing. A weapon was recovered, and Kim is being held on bail set at $2 million.

“We have one person that we believe is partially responsible, and he is with investigators currently,” police said.

Police say officers responded to the scene as if it were an active-shooter situation, which also prompted activating SWAT. The department later emphasized the scene was not an active-shooter situation.

Long Beach PD confirms not an active shooter at #Covenant Manor, however SWAT team members continue to surround building @CBSLA pic.twitter.com/0c5WUWHNVA — Kara Finnstrom (@KaraFinnstrom) June 25, 2018

The SWAT team moved into the multi-story building just before 5 a.m.

Resident Rick Convay said he was leading a group of people out of the building when he saw a man sitting on the stairs between the third and second floor with a gun in his hand, looking at the gun. The group went back up and found another way out before telling police what they saw.

The resident said he was familiar with the man as a regular bicyclist in the area, but did not know his name.

Another resident said he heard the explosion and saw where it took out a sliding door. He said he saw one of his neighbors had been shot.

A Los Angeles County Sheriff’s Department bomb squad was sent to examine two “suspicious devices” found at the scene, according to Nancy Pratt of the Long Beach Police Department.

At a vigil Monday night in Long Beach, Rosa was remembered as a family man and dedicated civil servant.

Services have not been announced.