Cell phone video of an arrest at the Rochester Transit Center shows a police officer using a taser on a man for dancing and refusing to leave the area.

The video was shared on the "Don't Shoot" anti-police brutality Facebook page, where it has gained nearly 100,000 shares and more than 12,000 comments.

It shows Branden Carter with a bus pass being confronted by transit security and a police officer, WHEC-TV reported. According to both Carter's account and the account of RTS spokesman Tom Brede, he was confronted by security for dancing while listening to his headphones at the bus stop in late February.

After being asked to leave, Carter walked around the corner instead, and encountered a Rochester police officer. That's when a bystander started recording the scene. Take a look at the video.

OH MY! Rochester, NY Police Officer tases and arrests black man for dancing. I bet it would be MUCH worse, if the camera wasn't there! Posted by Don't Shoot on Friday, March 4, 2016

In the video, the officer attempts to detain Carter, who asks why he's being arrested. The officer quickly draws the taser while Carter continues to ask why he's being detained. He offers photo IDs, and protests, saying he hasn't done anything wrong.

Then the officer fires the taser on him while Carter shouts "you cannot detain me," repeatedly, and the officer and security guards tackle him to the ground. The video ends when a voice is heard over a radio telling one of the security guards to get the person with the camera out of there.

According to Brede, Carter was "dancing and waving his arms," and security asked him to stop for the safety of other RTS customers. He says Carter refused, and started swearing at security.

"It was during these interactions that security identified a strong scent of alcohol coming from Mr. Carter," Brede said. Intoxication is a violation of the RTS code of conduct, and Brede said that is why he was asked to leave. When he refused, security called Rochester police.

Carter admitted to WHEC that he was dancing, and also said that he was emotional because he was going to visit his uncle in the hospital. He said he'd had one beer earlier in the day, but denied being drunk at the time the video was taken.

Carter told WHEC that he didn't comply with the order because he wasn't breaking any laws.

Police union president Mike Mazzeo told WHEC that the officer was justified in using the taser because he issued multiple verbal commands before doing so. He commended the officer for having patience, and attempting to to use verbal commands before resorting to the taser.

Carter was arrested and charged with resisting arrest and trespassing. Court papers say he refused to leave private property, but WHEC notes that the transit center is public property.

RTS and the Rochester Police Department are aware of the video and are reviewing the situation. RTS has not made security footage of the incident public.