A man who was shot while trying to rob a bank in March has admitted guilt.

Dragos Ungurean pleaded guilty in federal court to attempting to rob the M&T Bank in the 800 block of Penn Avenue in Wyomissing, Berks Co., on Mar. 19, prosecutors said.

An off-duty, plainclothes detective was inside the bank as a customer when Ungurean walked in. The detective, police said, shot Ungurean when he claimed to have an explosive device and demanded money.

The device was fake.

Ungurean, 30, will be sentenced in September. He faces approximately 60 months in prison and a possible fine.