Sean Williams sat on the curb, arms outstretched, listening to the at times conflicting commands of the officers threatening to shock him with a Taser.

The male officer, Philip Bernot, the one with the black and yellow Taser trained on Williams’ back, repeatedly told him “legs out!” and “straight out!”

The female officer, Shannon Mazzante, off-camera but just as insistent, also was yelling: “Put your legs straight out and cross them now!”

Their wording — and Williams’ exact movements — mattered immensely because by around 10:30 Thursday morning, their commands had escalated to threats:

“Legs straight out or you’re getting Tased,” Bernot warned.

Moments later, Williams, whose legs were not fully extended, shifted his legs. Bernot then squeezed the trigger, sending Taser prongs and a current of electricity through Williams’s body — and sparking virulent protests about what many claim is an abuse of power against a person who never posed a threat to officers.

“I was tased and I shouldn’t have been tased,” Williams told Lancaster, Pennsylvania, NBC affiliate WGAL at a protest held on the steps of the county courthouse that drew hundreds. “Because I followed every direction that was given to me.”

Juan Almestica, the bystander who heard the commotion and recorded the video of the police interaction, told ABC News that Williams appeared confused at the conflicting commands.

“One of the officers is telling him to put his legs straight, and another one is telling him to cross his legs. There were so many people shouting at him, he didn’t know what to do. Then they tased him because they said he wasn’t listening.”

The video of Williams’ interaction with the officers has riled the city of Lancaster and become the latest exhibit in the debate about whether police are too quick to use physical force — especially against minorities.

Lancaster Mayor Danene Sorace said the video is “of great concern to me.” She pledged a thorough investigation by police and the district attorney’s office and said the incident has strengthened her resolve to put a body camera on every one of the city’s patrol officers.

But that did little to quell the outrage. More than 200 people gathered Friday evening on the steps of the Lancaster County Courthouse, holding signs that said “Police brutality must stop” and “Show us who you serve & protect,” according to Lancaster Online.

“The trust is broken in the community. We have to believe that if we comply with a police officer whether you’re guilty or innocent of anything, that we’ll be treated fairly,” Kevin Ressler, with the Lancaster Action Now Coalition, told WGAL.

The case illustrates a conundrum for police officers, who train extensively on using the right amount of force for each situation.

But how should officers deal with people who are not violent but are noncompliant?

The stakes are particularly high in an age when nearly everyone has a video camera attached to a cellphone and such an interaction can spark online outrage before a suspect is even in handcuffs.

In a statement about the incident, Lancaster police said the video was just a snapshot of a larger, more complex series of interactions.

It started around 10 a.m. Thursday. Someone called 911 saying a person with a baseball bat had “gone after” another person on a street in central Lancaster.

Mazzante was first to arrive, and three people told her that Williams had refused to leave them alone.

The officer told Williams repeatedly to sit down, but he refused to comply, the statement said, telling one of the women that he wanted his Social Security card back.

Bernot was the second officer on the scene and also began shouting instructions to Williams. The statement does not reflect that both officers were issuing commands to Williams at the same time, a detail that is evident in the recording.

According to the statement, the officers wanted Williams to stick his legs out in front of him and to cross his ankles.

“This is done as a measure of control to (ensure) that if someone is going to flee or offer physical resistance, they will have to move their legs under them to do so,” the statement said. “Non-compliance is often a precursor to someone that is preparing to flee or fight with Officers.”

The police department said that officers talked to the people with whom Williams was interacting and that they claimed he was looking to fight, even going home to switch shoes.

Williams maintains that he was not violent or combative with officers at the point of arrest — an assertion reflected in the charges he faced that day.

He was arrested on drug possession and public drunkenness charges — both from a warrant unrelated to Thursday’s call.