A 77-year-old suspect was arrested in the shooting and booked for murder, two counts of attempted murder and arson. He was identified as Thomas Kin. He is being held on $2 million bail.
Police said he was a resident of the senior housing facility. A revolver was recovered at the scene.
Police also found two suspicious devices that were rendered safe by the Los Angeles County Sheriff's Department bomb squad.
Fire officials said the firefighter who died was Long Beach Fire Department Capt. David Rosa from Fire Station 10. The husband and father of two was a member of the fire department for 17 years.
Authorities responded to the 11-story Covenant Manor in the 600 block of E. 4th Street in the downtown area of the city at about 4 a.m. over reports of an explosion and fire.
Responding firefighters discovered a fire at the facility, some windows blown out and activated sprinklers -- all as they smelled some type of gas. After extinguishing the blaze, firefighters searched the building and shots were fired, Long Beach Fire Department officials said.
There were reports of an active shooting situation amid the chaos but officials later confirmed the incident was treated as a shooting.
Fire officials said two firefighters were shot and wounded. Rosa was in critical condition and pronounced dead at St. Mary Medical Center, where the American flag was lowered.
"This is a tough day," said Long Beach FD Chief Mike Duree, who held back tears as he struggled to speak. "It's a tough day."
The surviving firefighter was identified as 35-year-old Ernesto Torres, a 10-year veteran. Officials said he sustained a graze wound and was released from the hospital.
"Very saddened this morning, rough Monday morning for all of us. Our fire department and police department are brothers and sisters, so this is hitting us extremely hard," said Long Beach Police Chief Robert Luna.
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
Police Sgt. Brad Johnson said another person was also wounded and hospitalized. He was described as being in critical condition and in surgery.
Police said a person of interest was detained and a weapon was recovered. The shooting was being handled as a homicide investigation.
Investigators were also looking into whether the incident was an ambush. They added that devices deemed to be suspicious were also located.
A procession was being held to escort the body of Rosa, being driven from St. Mary Medical Center to a coroner's office. Several fire trucks, patrol vehicles and crowds of law enforcement participated in the somber moment.
"You go to these scenes and you never know what's on the other side of those doors," Luna said. "These brave firefighters went through those doors and, unfortunately, they were met with gunfire."