HERCULES -- A Hercules man was arrested Thursday in connection with an armed robbery of a man using an ATM in July, police said.

Police say Cornell Miller, 18, was the partially masked suspect who pulled a gun and demanded money from a man in an early morning robbery at the Wells Fargo Bank on Sycamore Avenue on July 22.

Investigators tracked Miller after he allegedly tried to use one of the victim's debit cards on multiple occasions at two banks, authorities said. Police searching his home Thursday morning also found evidence linking him to the robbery, according to police.

Miller was later arrested after a brief foot chase at Walmart in Richmond, where he works.

He faces one count of first degree robbery and nine counts of second degree burglary. He remains in custody at the Martinez Detention Facility on $280,000 bail.

David DeBolt covers breaking news. Contact him in Richmond at 510-262-2728. Follow him at Twitter.com/daviddebolt.