New York City police say a man who tried to rob a bank and was shot by a police officer had been released from prison a day earlier after serving a sentence for armed bank robbery.

Police say the man, identified as 69-year-old John Daniel Stolarz, was wielding a knife Thursday when he walked into a Chase Manhattan Bank branch next to entrances to Madison Square Garden and Pennsylvania Station.

New York Police Department spokesman Paul Browne says Stolarz was shot once in the leg by a uniformed officer who happened to be in the area. He was taken to a hospital in critical condition.

Browne says Stolarz was released from a federal prison in New Jersey on Wednesday.