A Houston officer has resigned after surveillance video caught him beating a man with a baton during an arrest.

The video, which was released Monday, shows Officer Jairus Warren and his partner approaching a man slumped over on a bench at a train station around 7:30 a.m. on Sept. 14.

Warren and the civilian, Darrell Giles, 31, are seen exchanging words just before Giles gets up. The officer then hits him at least 12 times before Giles falls down to the station platform, where he is hit two more times.

Giles was taken to jail and charged with resisting arrest and criminal trespass, but the charges were later dropped.

Giles told KTRK that he was told to get off the platform by Warren earlier in the morning and left, but came back to the bench to get his phone when he encountered the officer again.

After the Houston Metro Police Department concluded that Warren used excessive force and should be fired, the officer offered his resignation. The second officer, Daniel Reynoso, was suspended and ordered to undergo additional training.