The tense national drama is over. A 5-year-old boy is free, rescued after all those dales held hostage in a bunker. His captor is dead. Authorities carefully plotted their every move, every word, to make sure the boy came out alive. So, how did they do it?Abc's geon benitez is on the ground for us in alabama tonight. Reporter: A seven-day standoff came to an end today. The little boy taken hostage nearly a week ago, now safe. Authred an underground bunker, where 5-year-old ethan was held after negotiations broke down with 65-year-old jimmy lee dykes. Mr. Dykes was observed holding a gun. At this point, fbi agents fearing the child was in imminent danger entered the bunker and rescued the child. All rig Reporter: Tonight, dykes is dead. The standoff began last tuesday when dykes shot a school bus driver and snatched ethan. The boy, who is leabelieved to have autism, was held captive in the six by eight-foot underground bunker while teams carefully negotiated through a ventilation pipe. Dykes allowed what authority called comfort items to be sent down that pipe. Toys, coloring books, potato chips and ethan's medication. Police were careful not to anger dykes, believed to be watching news reports in the bunker, and even thanked him at one point. I want to thank him for taking care of our child. That's very important. Reporter: By night, police flew drones over that bunker, looking for signs ethan was still alive. All this, as the small town in alabama watched and prayed. Just today, a group of children made birthday cards for ethan, who will soon turn 6. He's my friend and I love playing with him. Reporter: Tonight, hugs and thanks, now that the town's prayers have been answered. And tonight, we don't know exactly how fbi agents got into that bunker. But we can tell you that we did hear a loud explosion, or, at the very least the sound of a loud weapon, diane. That must have been terrifying. But tell me, gio, anything we know about the condition of the child? Reporter: Well, we're told that he is physically unharmed. That is the good news. In fact, perhaps telling us that we saw an ambulance leave the scene and that ambulance had its lights and sirens off.

This transcript has been automatically generated and may not be 100% accurate.