A gunman burst into the company's headquarters with at least one explosive device strapped to his body and took three people hostage at gunpoint before police shot him dead.

The hostages - two Discovery Communications employees and a security guard - were unhurt after their four-hour ordeal at the hands of James Lee, 43, who had railed against the channel's environmental programming for years.

Montgomery County Police Chief Thomas Manger said tactical officers moved in late last night after officers monitoring Lee on security cameras at the building in Silver Spring, Maryland, saw him pull out a handgun and point it at a hostage.

An explosive device on his body detonated when police shot him, Mr Manger said. Police were trying to determine today whether two boxes and two backpacks had also contained explosives.

NBC News reported that after its producers called Discovery's general number, a man identifying himself as Lee got on the phone and said he had a gun and several bombs.

"I have several bombs strapped to my body ready to go off. I have a device that if I drop it, if I drop it, it will ... explode," the man said.

He said he built the bombs in about three weeks. "I did a lot of research. I had to experiment," he said.

Mr Manger said the suspect held the hostages in the lobby area of the first floor.

The "building is still a crime scene", Mr Manger said. "We still have work to do."

He said police spent several hours negotiating with the man after he entered the suburban Washington building about 1pm (6pm BST) yesterday. None of the 1,900 people who work in the building was hurt and most made it out before the stand-off ended.

Lee was convicted of disorderly conduct for a protest he organised outside Discovery's offices in February 2008. According to court records, he paid homeless people to carry signs and set off a scramble for money when he threw fistfuls of cash into the air, calling it "just trash".

Lee, who served two weeks in jail, was ordered to stay 500 feet away from Discovery headquarters as part of his probation, which ended two weeks ago. A magistrate ordered a doctor's evaluation, but the result was not immediately available.

"The Discovery Channel produces many so-called 'Environmental Programmes' supposedly there to save the planet," Lee said in an advert he took out in a Washington newspaper to promote the protest.

"But the truth is things are getting WORSE! Their programmes are causing more harm than good."

In court and online, Lee blamed the Discovery Channel for shows as varied as Future Weapons, It Takes A Thief and Planet Green.

Discovery Communications operates US cable and satellite networks including The Discovery Channel, TLC and Animal Planet.

David Leavy, Discovery's executive vice president for corporate affairs, said of the stand-off: "We're relieved that it ended without any harm to our employees."

At Lee's trial, The Gazette of Montgomery County reported, he said he began working to save the planet after losing his job.

He said he was inspired by Ishmael, a novel by environmentalist Daniel Quinn, and by former US vice president Al Gore's documentary An Inconvenient Truth.

Mr Quinn said today he had never heard of Lee and was stunned that his manifesto advocated things like human sterilisation and an end to farming, ideas Mr Quinn said he would never support.

Sign up to our free newsletters

Get the best updates straight to your inbox:
Please select at least one mailing list.

You can unsubscribe at any time by clicking the link in the footer of our emails. We use Mailchimp as our marketing platform. By subscribing, you acknowledge that your information will be transferred to Mailchimp for processing.