A week-long standoff in Alabama, where a retired trucker held a 5-year-old boy hostage in an underground bunker, has ended with the kidnapper dead and the child safe, according to law enforcement.

Officials were able to insert a high-tech camera into the bunker to monitor the movements of the suspect, Jimmy Lee Dykes, 65, and they became increasingly concerned that he might act out, according to a law enforcement source with direct knowledge.

Watch the full story, including exclusive new audio and other details of the standoff, on "20/20: Cat and Mouse" FRIDAY at 10 ET

"FBI agents safely recovered the child who's been held hostage for nearly a week," FBI Special Agent Steve Richardson said at a news conference late this afternoon.

The agent said negotiations with Dykes "deteriorated" in the past 24 hours.

"Mr. Dykes was observed holding a gun," Richardson said. "At this point, the FBI agents, fearing the child was in imminent danger, entered the bunker and rescued the child."

The boy, identified only as Ethan, was being treated at a hospital, authorities said.

"I've been to the hospital," Richardson told reporters this evening. "I visited with Ethan. He is doing fine. He's laughing, joking, playing, eating -- the things that you would expect a normal 5- to 6-year-old young man to do. He's very brave, he's very lucky, and the success story is that he's out safe and doing great."

"I'm a father," added Dale County Sheriff Wally Olson. "A lot of these men and women that's been sacrificing tireless hours, they're parents, as well. You know, it's a relief for us to be able to reunite a mother with her child."

Dykes is dead, but officials have not yet provided details on how he died or how the boy was rescued.

"Right now, FBI special agent bomb technicians are in the process of clearing the property for improvised explosive devices," the FBI said in a written statement late this afternoon. "When it is safe to do so, our evidence response teams, paired with state and local crime scene technicians, will process the scene."

Added Richardson this evening, "I can't talk about sources, techniques or methods that we use. ... We were speaking with the subject. I can tell you that. Other than that, I can't go into detail."

Dykes allegedly shot and killed a school bus driver last week and threatened to kill all the children on the bus before taking the boy, one of the students on the bus said.

"He said he was going to kill us, going to kill us all," Tarrica Singletary, 14, told ABC News.

Dykes had been holed up in his underground bunker near Midland City, Ala., with the abducted boy for a week as police tried to negotiate with him through a PVC pipe. Police had used the talks to send the child comfort items, including a red Hot Wheels car, coloring books, cheese crackers, potato chips and medicine.