A 51-year-old man was arrested inside the San Bernardino bank he attempted to rob.

James Boyd Rooks, of San Bernardino, was taken into custody Monday inside the Union Bank at 505 W. 2nd Street shortly after he allegedly simulated a weapon and passed a note demanding money from a teller, according to a police news release.

During the bank robbery, a witness reported the incident to the San Bernardino Police Department.

Officers responded and took Rooks into custody at the bank, according to the news release. Money was recovered from Rooks at the bank.

Rooks was housed at the Central Detention Center in San Bernardino and the FBI was notified about the bank robbery.