Alexander Buduria Flores, 36, allegedly took the money over the span of a month, The Orange County Register reported.
"He lost all the money gambling," Jim Amormino, spokesman for the Orange County Sheriff's Office, said. "He had a plan of winning it and pay it back before being caught."
When supervisors at Capstone Federal Credit Union audited Flores' drawer, they discovered he had too much cash on hand and asked him to deposit it in the vault.
"He said, 'I'm going to the restroom,'" Amormino said.
The bank supervisors waited for Flores to return for 15 minutes before finding that he had fled through a back door.
Flores later contacted an employee at the credit union to set up a meeting on Monday morning, however, he was apprehended and taken into custody by law enforcement.
"He was a trusted employee," Amormino said. "He worked there for three years; never had a problem."
Flores is also the main suspect in a similar case in Temecula, Calif.