The Bay County Sheriff Office identified the dead suspect as 49-year-old Kevin Robert Holroyd.
One person had a minor injury and was taken to hospital, city spokeswoman Caitlin Lawrence said Tuesday.
The hunt for Holroyd, who was wanted for a murder in Santa Rosa Beach, Walton County, ended his death about 57 miles southeast of Bay County after he opened fire on the police, the sheriff's office said Bay County.
The authorities did not say how Holroyd died.
The Bay County Sheriff Office and Panama City Police began to search for Holroyd if he returned to Bay County. The investigators began to see Holroyd's apartment in the city after his vehicle had been seen there. During this time, a complex resident called the fire department to report a smell of gas, the sheriff's office said.
The investigators got out of their cars to find out why firefighters had arrived at the complex parking lot, authorities said.
From one of the apartment's upper windows, Holroyd opened fire on the firefighters and investigators and other answering officers, including Panama City police, said the sheriff's office.
At one point, two officers from Panama City and a sheriff's deputy were nailed by gunfire behind their vehicles, the sheriff's office said.
Photos of Eryn Dion from the Panama City News Herald showed a strong police presence in the area during the stalemate.
Stacie Houchins said she would not see the incident, but she decided to go to the scene to see what was going on. She shared photos with CNN police with weapons drawn.
When she appeared on the scene, she said she heard several loud shots. She said the shots seemed like a quick fire.
SWAT officers finally entered the townhouse through a window upstairs, and officers found Holroyd's body dressed in body armor. The interior of the house was saturated with gas, the authorities said.
The authorities found several hundred rounds of ammunition, several high-powered rifles and torches, the sheriff's office said. The authorities believe that Holroyd had planned to use the torches to ignite the gas.
No further details about the murder in Santa Rosa Beach were immediately available.