The 77-year-old man charged with murdering a Long Beach firefighter early Monday was trying to kill himself and his upstairs neighbor when he detonated an explosive device in his apartment, authorities said today.

The blast sparked a blaze, prompting rescuers to rush into the building where the man, Thomas Kim, was waiting with a gun, authorities allege. Kim sat at the opposite end of the hallway from his apartment and began shooting after the firefighters arrived, prosecutors said.

The gunfire killed Long Beach Fire Capt. David Rosa, 45, according to police. It also grazed a second firefighter, Ernesto Torres, 35, and wounded another elderly man living at the building, authorities said. Torres is expected to make a full recovery, and the elderly man, whom authorities didn’t identify, was in critical but stable condition, they said.

David Rosa. Photo courtesy the Long Beach Fire Department.

Detectives’ belief that Kim set off the explosion as an attempted murder-suicide is based on a note he wrote that was found at the scene, police said. Investigators, however, are still trying to piece together why Kim allegedly decided to open fire on the firefighters, police said.

Kim had been feuding with a woman who lived upstairs from him, the Los Angeles County District Attorney’s office said.

He’d previously complained about other tenants, according to one neighbor who said she lived above him.

“He has had interactions with the police before today, complaining about different people making too much noise,” Suzanne Windmiller-Smith said Monday after being evacuated from the 11-story Covenant Manor building for low-income seniors at Fourth Street and Atlantic.

Windmiller-Smith said she woke up shortly before 4 a.m. to the smell of smoke and the sound of her neighbor screaming.

“I never want to feel like that again,” she said.

Authorities released the new details today as they formally charged Kim with two counts of attempted murder and one count each of murder, attempted murder of a firefighter, arson of an inhabited structure and explosion with intent to murder.

Police suspect elderly man set blaze before shooting firefighters in Long Beach, LBPD says

Kim was expected to appear in court today, but the hearing was postponed because of an unspecified medical issue, according to the District Attorney’s office.

Authorities have also charged Kim with special circumstances allegations, which means they could pursue the death penalty if they choose to do so, prosecutors said.

Kim is being held in lieu of $2 million bail, according to jail records. Police said they took him into custody at the scene of the shooting Monday morning. Authorities found two suspicious devices in Kim’s apartment, which were handled by a Los Angeles County Sheriff’s Department bomb squad, police said.

Kim’s brother, George Kim, previously told the Long Beach Post that he hasn’t spoken to his brother in decades, but he didn’t recall Thomas Kim harboring any animosity toward authorities.

“I think he lost his mind momentarily, not on purpose or anything like that,” George Kim said.

Additional reporting by Asia Morris.

Jeremiah Dobruck is managing editor of the Long Beach Post. Reach him at [email protected] or @jeremiahdobruck on Twitter.