NORRISTOWN, Pa. (AP) _ A two-day hostage standoff at Pennsylvania's largest mental hospital ended Friday with a fired nurse killing one of his captives and critically wounding the other after police broke a window to get a better look at him.

The gunman, Dennis Czajkowski, 40, was hospitalized in critical condition with cuts, broken bones and other injuries that state police said were apparently caused when officers seized him.

Czajkowski had been fired in April from Norristown State Hospital for reasons authorities would not disclose. On Wednesday, he took hostage two supervisors who had a role in his dismissal, and demanded an investigation into his firing.

He hadn't eaten or slept since the standoff began. Police had hoped to wait him out but said he grew agitated and they feared for the safety of the hostages, so they shattered a window to get a better look inside.

Czajkowski opened fire, killing Carol Kepner, 44, and wounding Maria Jordan, 37, before being grabbed, police said.

Prosecutors planned to charge him with homicide and attempted homicide.

Shaken after the standoff ended badly, State Police spokesman Robert Whitbeck said Czajkowski had never threatened the hostages, ``but his agitation caused us to feel that we had to get a visual of the room.''

``We were trying to speak to the women and to see them and he was not letting us,'' Whitbeck said. ``The primary objective throughout the entire thing was to keep all three of them safe.''

Whitbeck wouldn't say what Czajkowski did to lead police to believe he was agitated, and described the gunman's conversations with negotiators as ``even-keeled or consistent.''

Jordan, 37, was wounded in the chest and abdomen, but her surgeon said she was doing well and would make a full recovery.

The hospital's 650 patients were moved to safe quarters on Wednesday. Areas away from the nursing offices continued to operate normally Thursday for the most part.

The 118-year-old hospital on 233 acres has a locked area where the worst of the criminally insane are kept. It also serves the chronically mentally ill. Neighbors have sought tighter security after dozens of patients walked away from the hospital over the past two years.

Czajkowski and his captives were in Ms. Jordan's office in an administrative building.

``He was terminated and the two women he is holding were part of that decision,'' Whitbeck said. ``He specifically targeted at least Maria Jordan. We don't know whether he knew for sure whether Carol Kepner would be there.''

Negotiations had centered on an investigation of Czajkowski's firing, Trooper Dave Lester said. Police promised to look into the matter, but Czajkowski wanted certain individuals, whom the trooper would not identify, to investigate.