If a California teenager had simply complied with an officer attempting to detain him for jaywalking, the officer would not have used force, a Stockton police official said this week. Emilio Mayfield, the 16-year-old boy whose videotaped arrest went viral Thursday, had been combative with the officer who was seen striking him with a baton Tuesday, the official told a local newspaper.

The video, which shows several officers detaining and handcuffing the sobbing teen at a Stockton bus station, sparked immense outrage online and prompted local protests Thursday afternoon, the Stockton Record reported. None of it would have happened if Mayfield had not grabbed at the officer’s baton and resisted arrest, said police spokesman Joe Silva.

“If everyone would comply with the lawful orders of police officers, force would never have to be used,” Silva said, according to the Record’s report. Eyewitnesses have called the police reaction excessive and said the teenager did nothing to deserve the treatment.

The officer in question, who has not been named, told Mayfield to stop walking in a bus-only lane outside of the San Joaquin Regional Transit District station in Stockton, a city of about 301,000 in the Central Valley 50 miles south of Sacramento. But instead of obeying the order, Mayfield used “profane language, telling the officer he didn’t have to listen to him,” the spokesman said.

“The kid continued to walk in the lane, so the officer went over there to legally detain him, and at that time there was a scuffle,” Silva said. When the video starts, the officer is seen leaning on Mayfield and using his baton to keep his legs down.

Mayfield grabbed the baton during the scuffle, police said, and the officer appeared to strike him in the face with the weapon. “Officers are trained on weapon retention techniques for obvious safety reasons,” Silva said, adding that the video also shows the teen “holding onto” the baton. “As police officers, we cannot and will not let anyone take any of our weapons away, not only for our safety but for the safety of the general public.”

The officer radioed for backup and at least eight officers responded to the scene. Four are seen wrestling Mayfield to the ground by his wrists, while others attempted to cordon the scene off from a crowd that gathered at the bus station.

Mayfield told local TV that he was on his way to school on the morning of his altercation with officers. “I feel traumatized,” he told CBS affiliate KMAX-TV. “I was beaten and slammed on the floor.”

After his arrest, the teen was released to his mother, the Record reported. Mayfield’s family met with Stockton’s branch of the NAACP and filed a complaint at the police department against the officers involved, according to local media reports.

“The behavior of the officer was totally out of line,” Bobby Bivens, the NAACP branch president, told KMAX. “There’s no reason for him to attack this young man as he did.”

Mayfield, who has been charged with resisting arrest and trespassing, has to appear before a juvenile court to respond to the two citations issues by police. It was unclear Friday if the officers’ actions would be investigated further by the Stockton Police Department.