A gun-wielding NASA contract worker took two people hostage at an office building of the US space agency in Houston and killed one of them before turning the weapon on himself.
Police, who had surrounded the building at Johnson Space Centre on Friday, entered when they heard a gunshot and found the second hostage, a woman, tied up with the tape.
The gunman was identified by NASA as 60-year-old Bill Phillips, a contract engineer at the site who was an employee of Jacobs Engineering and had been associated with the space agency for the past 12 years.
Phillips was able to take a gun past NASA security and barricaded himself in the building after which he took two co-workers, David Beverly and Fran Crenshaw, hostage.
The gunman shot Beverly in the chest in the early minutes of the whole ordeal and later shot himself in the head inside Building 44, which houses communications and tracking systems for the space shuttle.
Crenshaw was found unharmed nearly four hours after the standoff began. She was treated at a hospital for minor injuries and released.
Police Captain Dwayne Ready said officers were called to the scene at about 12.10 am after a man was seen with a gun.
Ready said police were making contact with the suspect when they heard the gunshots. "Believing that the suspect may have shot himself the decision was made to make entry."
After the gunman was reported, Building 44 was evacuated and an e-mail was sent to staff across the sprawling complex telling them to remain inside their buildings. A second e-mail was later sent telling employees they could go home whenever they wished.
An intermediate school near the building was also secured for several hours.
All three - the hostages and gunman - knew each other and they may even had lunch together earlier in the day, Johnson Space Centre Director Michael Coates told a press conference.
The motive behind the killing was not known. Phillips lived alone, was not married and had no kids.
"Apparently there was some type of dispute between" Phillips and Beverly, Houston Police Chief Howard Hurtt said.
Visitors and employees need badges to get into the space centre and cars are randomly checked for bombs.
"We have a standard set of security rules that do include random vehicle searches," NASA spokeswoman Eileen Hawley said.
"Certainly, I would believe that our security and our senior leadership is going to take a very close look at this incident, and see if there was anything that we should have done or could have done differently."
NASA chief Michael Griffin headed to the centre after the shooting, the space agency said.
The space agency officials said that its operations were not interrupted by the incident. NASA employees watched the drama on television as they were locked down.
The Johnson Space Centre contains Nasa's mission control, which oversees the agency's space flights.
The stand-off came nearly a week after a South Korean-origin gunman killed 32 students and teaching staff, including two Indians, at Virginia Tech university before killing himself.