Michael Vargas, police say, tried to hold up a convenience store on Legion Parkway Tuesday night around 8:30 p.m. Surveillance tape shows a customer in a black coat tackled Vargas and shoved him out the door while the store’s owner, Maria Pinguil, repeatedly whacked him with a broom handle, the Brockton Enterprise reported.

Pinguil sustained some minor injuries to her hand and side during the attack. Vargas, according to authorities, then stole a waiting cab and severely injured the driver as he drove off. Police later found the cab abandoned.

Vargas, 30, whose listed address is 11 Elise Circle in Easton, was originally arrested on an outstanding warrant when he showed up at the Good Samaritan Medical Center the morning after the crime. He was identified through surveillance video and witness statements and charged later in the day Wednesday in connection with the attempted robbery. The crime was investigated by officer David Delehoy.

Vargas will be arraigned in Brockton District Court on charges of armed robbery, two counts of assault and battery with a dangerous weapon, assault with a dangerous weapon, assault and battery, armed carjacking, leaving the scene of personal injury, leaving the scene of property damage, operating a motor vehicle with a suspended license and larceny under $250.