San Francisco police arrested a man they say shot video of himself beating an older Asian man collecting recyclables and then posting it on social media.

Police said they began an investigation Monday after being made aware of the video, which had been viewed millions of times, according to reports.

The video recorded the victim being struck Saturday afternoon in the back of the head and robbed of a cart full of recyclables, police said in a news release Thursday. A person recording the incident can be heard ridiculing the victim by telling him, "Go get your cans", and "I hate Asians".

SOLDIER IN IRAQ CAPTURES CROOKS BURGLARIZING ILLINOIS HOME WITH DOORBELL CAMERA APP

“He had a complaint of pain but no visible injury,” police said.

On Thursday, officers arrested Dwayne Grayson, 20, in the case. He was booked on suspicion of robbery, elder abuse, a probation violation for a prior robbery conviction and a hate crime enhancement.

TENNESSEE MAYOR ACCUSED OF STEALING OVER $300G FROM HIS GRANDMOTHER, HER ESTATE

Police said the crime was bias-related.

Grayson was on probation for a prior robbery conviction at the time of the incident.

Police said a second suspect was being sought.

San Francisco Police Chief Bill Scott, who made the announcement at a rally for peace and unity at the same housing project where the incident took place, said: “What we saw on that video was horrific. Make no mistake about it.

“We heard from people all over the country, not just San Francisco.”

CLICK HERE TO GET THE FOX NEWS APP

He added that a search is still on for a second suspect in the incident.