MIDLAND CITY, Ala. -- The man who held a 5-year-old boy captive for nearly a week engaged in a firefight with elite police agents storming his underground bunker before he was killed during the rescue operation, the FBI said Tuesday night. And bomb technicians scouring the property found two explosive devices, one in the bunker, the other in a plastic pipe negotiators used to communicate with the man.

Officers killed 65-year-old Jimmy Lee Dykes on Monday, said a law enforcement official in Midland City, speaking on condition of anonymity. The bunker raid came six days after Dykes boarded a school bus, fatally shot the driver and abducted the boy, who by all accounts was unharmed.

Dykes "reinforced the bunker against any attempted entry by law enforcement," FBI Special Agent Jason Pack said in an email. The devices found were "disrupted," Pack said, though he did not say whether that meant they were detonated or disarmed. Officers will continue into Wednesday to sweep the 100-acre (40-hectare) property and when they finish, investigators can more thoroughly investigate, Pack said.

For days, officers passed food, medicine, toys and other items into the bunker, which was similar to a tornado shelter and apparently had running water, heat and cable television.

On Monday, authorities said Dykes had a gun and appeared increasingly agitated, though it's unclear exactly how his behaviour changed. Negotiations -- the details of which have not been made public -- were deteriorating. Agents stormed the bunker, whisking the boy to safety and leaving Dykes dead. The official who confirmed that officers killed Dykes requested anonymity because the person was not authorized to speak publicly about the investigation.

Neighbours said they heard what sounded like explosions and gunshots, though the FBI and local authorities would not confirm if shots were fired or explosives detonated.

By all accounts, despite his ordeal, the 5-year-old appeared to be acting like a normal kid, people around him say. He was running around, playing with a toy dinosaur and other action figures, eating a turkey sandwich and watching "SpongeBob SquarePants," relatives and Dale County Sheriff Wally Olson said.

"We know he's OK physically, but we don't know how he is mentally," Betty Jean Ransbottom, the boy's grandmother, told The Associated Press on Tuesday. She added that she feared the ordeal would stay with the child, who turns 6 on Wednesday, the rest of his life.

An FBI agent had been staying with the family, and relatives learned of the child's rescue after another agent at the scene called the person who was with them.

The family was relieved and grateful for all the support in a community where ribbons, fliers and vigils all symbolized the prayers for the safe return of the boy, whom law enforcement officials have identified by his first name, Ethan.

The boy's mother, in a statement released by the FBI, expressed her thanks for all the hard work of so many officers to bring her son home. The woman declined to be identified, the statement said.

"For the first time in almost a week, I woke up this morning to the most beautiful sight ... my sweet boy," she said. "I can't describe how incredible it is to hold him again."

Dale County Coroner Woodrow Hilboldt said Tuesday that he had not been able to confirm exactly how Dykes died because the man's body remained in the bunker. An autopsy was to be conducted in Montgomery once the body is taken away.

It also wasn't clear how authorities knew Dykes was armed, or what kind of surveillance they used to track his behaviour and movement. Pack did not address the questions in Tuesday's email.

At the request of law enforcement authorities, Secretary of Defence Leon Panetta had approved the provision of certain equipment that could be employed to assist in the hostage situation, according to a U.S. official who requested anonymity to discuss a pending law enforcement matter. It is not clear whether the equipment was actually used.

In Midland City, a town of about 2,400 nestled among peanut and cotton fields, residents were relieved that the boy was safely rescued from Dykes, a man neighbours described as an unstable menace who beat a dog to death and threatened to shoot trespassers.

Children and teachers were trying to get back to normal, though some children who were on the bus where Dykes killed the driver have not yet returned to school, said Donny Bynum, superintendent of Midland City schools. Counselors and clergy are at the school to help any distraught students.

Officials hope to eventually throw a party to celebrate the boy's sixth birthday and to honour the memory of Charles Albert Poland Jr., the slain bus driver. No date has been set, Bynum said.

Midland City Elementary School principal Phillip Parker said he stands at the entrance to the school every day as the children arrive. The boy is a friendly, energetic child who comes up, shakes his hand and then continues on into the school as if he's in a hurry, Parker said.