Warning: Graphic language

A man accused of fondling himself by a woman on a No. 2 train was publicly shamed — right off the train — by the enraged, foul-mouthed straphanger who captured the bizarre subway encounter in a now-viral video.

“What are you doing? You’re over here rubbing your d-ck. What the f–k are you doing?” Deanna Carter can be heard shouting in the cellphone video — which focuses on a terrified-looking man sitting directly across from her on the Bronx-bound train.

In the 2-minute cellphone video — which Carter uploaded to Facebook Monday — she continuously berates the man on the crowded train, saying, “You want to do that freaky sh-t, do that sh-t off the mother—king train.”

Carter even threatens the man as he sits quietly with his backpack in his lap.

“Do it again and I’ma get up out this chair and I’ma bust your f–king ass on this train. We understand each other? Do we f–king understand each other?” Carter shouts, prompting the man to nod in agreement.

“You wanna’ rub your d-ck, b-tch. You rub your d-ck when you get off the mother—king train … I’m in one of those moods. I will f–k you up on this train, you hear me?”

Carter demanded that the man exit the train at the next stop at the Times Square-42nd Street station.

“When this train stops, you get the f–k off. Do you understand me? I can’t hear you. Say you understand me, miss!” Carter says, and the man can be heard whispering, “I understand you.”

Carter continues, “I don’t give a f–k if this ain’t your stop. You get off this train with that freaky sh-t. Get up!”

And the apparently mortified man obeys and gets up.

“Get the f–k off before I beat the sh-t out of you,” Carter says before dozens of stunned straphangers. “You got the right one, honey, because I’m a crazy b-tch, please believe me!”

She says again, “Get the f–k off this train,” before the man scampers off.

Carter uploaded the dramatic video to her Facebook page with the caption: “TELL ME WHY THIS DUDE WAS RUBBING HIS PENIS SITTING ACROSS FROM ME. I WENT OFF! I’M SO MAD RIGHT NOW. GOT HIS FACE ON VIDEO THO. HE BETTER HOPE I NEVER SEE HIS NASTY ASS AGAIN!”

The video garnered more than 592,000 views by Tuesday afternoon.