A man who had made previous threats against police set his house on fire Saturday and ambushed the first sheriff's deputy who responded, fatally shooting the deputy and wounding another before he was killed by a police officer who lives nearby, a law enforcement official said.

The man's name and address had been entered into a law enforcement computer system because of previous threats, but the 911 dispatcher who entered the fire call put in the address of a neighbor who reported the blaze, so the alert wasn't activated and the Leon County deputy who responded first had no warning, said the official, who spoke on the condition of anonymity because they weren't authorized to release the information.

The gunman was hiding outside the house when the deputy approached about 10:15 a.m., the official said. He shot the deputy from behind, shot him again after he fell and then took the deputy's gun. The gunman then tried to take other weapons from the deputy's car, but they were locked down, said the official said, who had spoken to law enforcement officials handling the case.

The gunman, who lived at the end of a cul-de-sac, then shot another deputy, who escaped serious injury because of a bullet-proof vest. A Tallahassee police officer getting ready to work the Florida State University football game heard the shots, ran outside and fatally shot the gunman, who was hiding as other deputies and officers approached, the official said.

The names of the gunman and the dead and wounded deputy have not been released. Details of the gunman's previous threats to police officers were not available. The shootings were captured by surveillance video cameras in the neighborhood, the official said.

Pockets of flames could still be seen in the smoldering wreckage of the destroyed home hours after the fire was set. As night fell in the middle-class neighborhood, investigators sifted through the rubble with shovels under the bright glow of spotlights. The official said authorities didn't think anyone was killed in the fire.

"It is almost unimaginable that a call for help turned into the ambush of a Leon County Sheriff's Deputy and the shooting of another deputy by the assailant. Every one of these first responders is a hero and our hearts go out to them and their families," Tallahassee Mayor Andrew Gillum said in a statement.

Neighbor Joan Cabbage said she called 911 to report the fire while her husband Henry went outside. She said she could see two patrol cars pull into the cul-de-sac when she heard "pop, pop, pop, pop, pop" that she thought was from the house burning.

"I saw a fire truck and he started backing up real fast -- I couldn't figure out why," she said. Her daughter, who had just left the house, then called to say police officers were running down the street with guns drawn.

"That's when I knew something big was going on," she said.

Dana Harrison, 20, said she was babysitting three young boys in a nearby house when she heard sirens, went outside and saw the fire. She then heard popping sounds, which she thought was caused by the fire, but a neighbor said they sounded like gunshots. She had hustled the boys inside when two police officers banged on the front door and then ran through the house into the backyard, which is near the burning house. The police told Harrison to get everyone into the bathroom.

"I was scared," she said.

The shooting near Florida's capital comes just two days after a police shootout at Florida State University left a gunman dead after he wounded two students and an employee.