WHITE PLAINS, N.Y. – A 36-year-old Yonkers man who was caught on camera brutally beating an elderly woman on a New York City subway is in custody, the NYPD said.

Marc Gomez is accused of repeatedly kicking the elderly woman while she sat on the northbound No. 2 subway at the East 238 Street/Nereid Avenue station around 3:10 a.m. on March 10, police said.

Attorney Steven Mechanic, of the Legal Aid Society, says Gomez insists she threatened to stab him, and displayed some kind of sharp instrument. He made these claims at Gomez's arraignment early Sunday morning in Bronx Criminal Court, according to the New York Post.

He was charged with two counts of second-degree assault, third-degree assault and harassment.

Bystanders took a video of the alleged assault, which went viral on social media.

The victim was treated and released from a hospital and is receiving care, advocacy and support, NYPD Chief Dermot Shea said on Twitter.

"The subject wanted for the brutal subway attack of an elderly woman IS IN CUSTODY," Shea said in a tweet. "Thank you to the worldwide community for the tremendous assistance."

Gomez was ordered to be held. His next court date is March 29.

Hate crime:Ruth Bader Ginsburg subway poster vandalized with swastika, NYPD investigating

Murder on the high seas:Florida man charged with bludgeoning crew member to death on commercial fishing boat

Contributing: The Associated Press

Follow Christopher J. Eberhart on Twitter: @ChrisEberhart2