The man, named as James Lee, is said to have had a 'history of conflict' with the Discovery Channel [AFP]

Three hostages have been rescued from the Discovery Channel Communications building in the US after police shot and killed the man who was holding them, officials said.

The attacker had canisters strapped to his chest and a handgun when he entered the headquarters located in Silver Spring, Maryland, just outside Washington DC, police said.

Discovery employees were evacuated from the building, where nearly 1,900 employees work, shortly after the incident began at about 1700 GMT on Wednesday.

Officers who had been watching the hostage drama unfold on a building security camera crept in while police negotiated with the attacker and shot him when he pointed his pistol at one of the three men he held hostage.

"A hostage moved, he pulled his gun, and a shot was taken," Tom Manger, the Montgomery County police chief, said.

The hostages - two Discovery employees and a security guard - just happened to have been in the lobby and were kept lying on the floor by the attacker, Manger said.

The police had held several hours of talks with the man.

'History of conflict'

The man, named by a US law-enforcement official as James Lee, 43, had been arrested before for protesting against Discovery Channel over environmental issues.

"He had a history ... of conflict with Discovery," Manger said.

A man called James Lee of San Diego, California, was arrested outside Discovery's headquarters in 2008 after throwing thousands of dollars into the air in protest against the network, according to the Montgomery County Gazette, a local newspaper.

 James Jay Lee, pictured, was known for protesting outside the Discovery Channel building [AFP]

Lee said he threw the money because Discovery's programming had little to do with saving the planet.

He reportedly was also the author of the website savetheplanetprotest.com, where he demanded that the Discovery Channel broadcast programmes that would help "to save the planet" by "decreasing the human population."

Al Jazeera's Laura Kyle said the website was urging people to stop having what he called "parasitic human infants".

"But Lee's own extreme belief in his cause ultimately ended in his own death," she said.

David Leavy, a spokesman for Discovery Communications, said the company had known the gunman before this incident but "did not take his threats or demands seriously".

"If you follow what he said publicly online, I don't think it's rational. We certainly were cognizant, aware of him."

Discovery Communications reaches 1.5 billon subscribers in more than 180 countries through networks like Discovery Channel, TLC, Animal Planet, Science Channel and Planet Green networks.

Source: Al Jazeera and agencies