MIDLAND CITY, Alabama (CNN) -- A 5-year-old child abducted from a school bus six days ago is safe, and his kidnapper is dead, ending a nearly weeklong ordeal for the little boy, his family and a small Alabama town.
The child appeared to be OK when he was freed, law enforcement officials said. The boy was taken to Flowers Hospital in nearby Dothan, Alabama state trooper Kevin Cook said.
The child -- identified only by his first name, Ethan -- was to be reunited with his mother and grandmother at the hospital, state Sen. Harri Anne Smith said.
The legislator said she was just arriving for an afternoon visit with Ethan's mother when authorities whisked away the mother and her family. Smith said the woman's smile, and the smiles of others, gave away the good news. The two hugged before authorities drove the mother away.
FBI Special Agent in Charge Steve Richardson at the scene said negotiations had broken down with 65-year-old Jimmy Lee Dykes, the child's abductor, and Dykes was "observed holding a gun."
Believing the child to be in imminent danger, an FBI team entered the bunker at 3:12 p.m. CT (4:12 p.m. ET) and rescued the boy, Richardson said, adding that the hostage-taker is dead.
One neighbor said he was outside when he was startled by the sound of an explosion.
"I heard a big boom and then ... I believe I heard rifle shots," said Bryon Martin, who owns a home near the bunker where the boy had been held since Tuesday.
It was a loud noise that "made me jump off the ground," he said.
After the good news spread through the community, travelers on a nearby highway honked their horns as they drove by.
The FBI had borrowed from the U.S. military high-tech detection equipment similar to the technology used to discover homemade bombs in war zones, three Defense Department officials told CNN.
It was unclear whether the equipment, which is not readily available to civilian law enforcement, had been used by the FBI.
One of the defense officials said no members of the military were involved in the rescue. They would have been acting a technical advisers, the official said.
Last Tuesday, police said, Dykes boarded a Dale County school bus and demanded the driver hand over two children.
The driver, Charles Albert Poland Jr., refused, blocking access to the bus's narrow aisle as at least 21 children escaped out of the back emergency door, authorities said.
The gunman killed Poland, then grabbed a kindergartner before barricading himself and the boy inside a nearby bunker he had built.
Smith said Monday that Ethan has siblings, but none of them were on the bus last week.
In the ensuing days, officials said little about what was going on in the bunker or in their strategy, or what -- if anything -- Dykes wanted.
"Based on our discussions with Mr. Dykes, he feels like he has a story that's important to him, although it's very complex," Dale County Sheriff Wally Olson said Monday before the hostage situation ended. He didn't elaborate.
Ethan suffers from Asperger's syndrome and attention deficit disorder, state Rep. Steve Clouse said during the week.
Dykes told authorities that he had blankets and a heater in the bunker, and authorities have previously said the bunker -- built 4 feet underground -- has electricity.
Authorities did not say how they were communicating with Dykes.
Meanwhile, residents and business owners in Midland City put up blue, red and black ribbons in support of the boy and Poland. Blue and red are the local school colors, and black is in honor of the slain bus driver.
The U.S. Navy confirmed Monday that Dykes served in the military from 1964 to 1969.
Naval records list him as an aviation maintenance administrationman third-class who served with units based in California and Atsugi, Japan. The job entails clerical work related to aircraft and aircraft maintenance, according to the Navy's job description.
Neighbors and officials had described Dykes as a survivalist with "anti-government" views.
Even as the hostage situation continued Monday morning, plenty of police were on hand as schools in neighboring Ozark, Alabama, reopened for the first time since the incident began.
Dale County schools remained closed but were to reopen on Tuesday, the district said.
In Ozark, school officials decided to begin strictly enforcing a 15-foot safety zone around school buses required by state law. The law prohibits any unauthorized adults, including parents, from approaching within 15 feet of a school bus stop. If an unauthorized adult gets too close, bus drivers are supposed to close bus doors or drive away, if necessary, school officials said.