A man in a wheelchair at a hospital who claimed his oxygen tank had a detonator was fatally shot by police after a four-hour standoff.

Terrance Baughman, 32, was shot in the chest and died about seven hours later after undergoing surgery Monday at Boulder Community Hospital, police said.

It was not clear why Baughman was at the hospital. He was a Boulder resident who had once been a patient there.

Baughman got out of the wheelchair during the standoff, leading officers to fire, police spokeswoman Sarah Huntley said.

"It was his movement that triggered the confrontation," Huntley said.

Police used a robot to remove a red bag found in Baughman's possession, and they took it to a nearby park and detonated it. They had not determined what it was as of Monday night.

The standoff started around 9 a.m. when the man, in a vestibule leading to the main lobby and the emergency room, said he had a detonator. The bomb squad and special police teams responded.

Five emergency patients were moved to another part of the emergency room, and the 200-bed hospital was locked down.

The lockdown was lifted Monday afternoon, but the vestibule, lobby and part of the emergency room remained closed while police investigated.