CHICAGO (AP) _ A gunman killed three people and injured another Friday when he walked into an office at a prominent downtown skyscraper, chained the doors behind him and opened fire before police killed him as he held a hostage, Superintendent Phil Cline said.

The shootings at the 43-story Citigroup Center, which also houses a train station, sent office workers fleeing and stranded rush-hour commuters.

Cline said the gunman, who was armed with a revolver, a knife and hammer, didn't work in the office but demanded to see one of the victims who was killed. The gunman had been escorted to the office by building security and was carrying a manila envelope where he apparently hid the weapons, Cline said.

``He was not employed there but we feel he did have previous encounters with the individuals in that office,'' Cline said.

None of the dead victims, all men, or the gunman were identified. A fourth victim, a woman, was shot and taken to the hospital in serious condition. The hostage was unharmed, police said.

Fire officials said they received reports of shots fired on the 38th floor, which houses law offices, around 3:15 p.m. The man began shooting after locking the door with a padlock and chain that he had brought with him, Cline said, then ``grabbed a hostage and he was pointing a gun alternately at the hostage's head and his own head.''

Officers entered through another door, Cline said, and a SWAT officer shot him with a sniper rifle from about 45 yards away. He said there was no negotiation, and there were up to 30 other people on the floor at the time.

Cindy Penzick, secretary in a law firm on the 37th floor, said that after a co-worker told her she heard gunshots, a police officer with his gun drawn on their floor yelled at them to get out.

Penzick said she is usually calm, ``But I have to tell you this was scary as hell.''

People hurried down the escalators and ran from the skyscraper on the west side of downtown. Dozens of police cars and two fire trucks were in front of the building, where one person was seen being loaded onto an ambulance.

Keegan Greene, who works at Verizon Wireless on the first floor, was helping a customer when fire alarms began going off.

``One of the security guards came up to us and started saying, ``Run, run, run, run, run!'' Greene said.

Service on the Metra commuter line was suspended for more than an hour and area buses were diverted while the incident unfolded. Metra spokeswoman Judy Pardonnet said all Metra crew members had been locked into secure areas before train service resumed just after 5 p.m.

___

Associated Press writers Don Babwin, Deanna Bellandi and Dave Carpenter contributed to this report.