Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

San Francisco police on Thursday arrested a man who they said recorded last week's attack on an older Asian man and posted it to social media.

Dwayne Grayson, 20, was arrested Thursday morning outside his home on charges of robbery, elder abuse, a probation violation for a prior robbery conviction and a hate crime enhancement in Saturday's attack on a 68-year-old man who was collecting recyclables, police said. SFPD

Dwayne Grayson, 20, is facing charges including robbery and elder abuse as well as a hate crime enhancement in Saturday’s attack on a 68-year-old man collecting recyclables, police said. He's also accused of probation violation for a prior robbery conviction.

The police department said in a statement that Grayson recorded and posted video of the attack that went viral and has been viewed millions of times.

Grayson was being held without bail Thursday night. It was not immediately clear Thursday night if he had an attorney.

The Morning Rundown Get a head start on the morning's top stories. This site is protected by recaptcha

Police are searching for another suspect, and the chief said a second arrest is expected soon.

The video shows a man wearing a dark jacket, black pants and black sneakers threatening and brandishing an object at an Asian man. Bystanders watched the attack and hurled racially charged taunts at the man as well.

"I hate Asians, n—," one person can be heard yelling in the video.

The victim can be seen crying as onlookers imitate him and laugh and hold phones up to his face as he is visibly distressed.

The victim was struck on the back of the head and complained of pain but had no visible injury, police said.

Community groups called for action after the attack. San Francisco has a large Asian-American population, making up around 34 percent of the city’s population, according to 2017 census estimates.

Police said in Thursday's statement that officers had been working tirelessly to identify those responsible.

"We don't tolerate this type of behavior in our city," Police Chief William Scott said Thursday.

Mayor London Breed said at a community gathering Thursday that the video sparked widespread outrage, and not just in the Asian community. She said many black residents also said called for action, according to video from NBC Bay Area.

"I would never want anyone to treat my grandmother the way that I saw an elderly person treated here," Breed said in the Bayview District. "We are better than that."

San Francisco’s Bayview community is in the eastern section of the city, southeast of the Mission District.