A 77-year-old suspect identified as Thomas Kim was arrested in the shooting and booked for murder, two counts of attempted murder and arson.
Police said Kim 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 sons, ages 25 and 16, was a member of the fire department for 17 years.
Long Beach firefighters, police discuss fatal shooting
Authorities responded to the 11-story Covenant Manor in the 600 block of E. 4th Street near downtown Long Beach around 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.
They also smelled gasoline.
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. A civilian, identified only as an elderly male resident of the facility, was hospitalized in stable but critical condition.
Rosa was transported 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.
Luna said investigators still have many unanswered questions about the incident.
"There's still a large puzzle that we're trying to put together. And there's a lot of information that we don't know yet," Luna said."
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
About 80 residents of the senior facility were evacuated from the building and were being sheltered at the Silverado Park community center in Long Beach with assistance from the Red Cross and other agencies.
Investigators were looking into whether the incident was an ambush.
A procession was held to escort Rosa's body from St. Mary Medical Center to the coroner's office. 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."
Long Beach Mayor Robert Garcia said the whole city is in mourning.
"Long Beach really lost a hero today," Garcia said. "The entire city as well as our fire department is mourning the loss of someone who was very dear to our community."