Karisma Sandoval

The Republic | azcentral.com

Newly released court records detail what prompted Phoenix police to shoot a masked protester in the crotch with a pepper ball on Tuesday night and arrest him days later after he outed himself in the media and online.

Joshua Cobin, 29, was arrested Thursday on suspicion of three counts of aggravated assault and one count of unlawful assembly for actions police allege he made while protesting outside President Donald Trump's rally at the Phoenix Convention Center.

Cobin, of Scottsdale, identified himself online and in media reports as the masked man in a viral video who was shot by police with a pepper ball after he kicked a gas canister at them.

Officers are now saying Cobin was in a large group of protesters who were told to leave the area several times. Instead, he ran in front of police lines and refused to obey officers, police allege in court records.

RELATED: AZ man loses job after post about driving through Trump protesters

Police said Cobin was acting in a way that is considered constituting a riot.

While wearing a gas mask, police said, Cobin tried to kick a tear gas canister toward officers and then picked up the canister and threw it at them.

Court records describe Cobin as throwing a second canister and kicking another one before officers deployed a round of pepper balls "to stop the defendant's continued assault on them."

New video of Cobin in court showed his right hand to be bandaged, and his attorney said Cobin has serious injuries that require medical attention.

In the video, Cobin's attorney also said she was on the phone with Cobin and Phoenix police commanders attempting to negotiate before he was arrested at his workplace on Wednesday. She said police took action before Cobin could turn himself in.

Maricopa County prosecutor Casey Mundell asked the judge to set a $3,500 bond for Cobin.

MORE: How many people were in downtown Phoenix for Trump rally, protests?

Mundell said the state "concedes Mr. Cobin doesn’t have any prior criminal history, has a steady job. However, the evidence that has been presented to the state at this point is cause for alarm that there might be some future actions that the community needs to be protected from."

Commissioner Paula Williams said she didn't find Cobin to be a general danger to the community or a specific danger to anyone in particular, and released him from jail on his own recognizance.

Williams cautioned Cobin about discussing the incident on social media.

Cobin's next court date is set for Sept. 7.

READ MORE:

A sudden change, a cloud of gas and real news in the making

Fake news? Trump supporters circulate photo of Phoenix rally crowds ... but it's not

Trump protests in Phoenix: What caused the night to unravel?

'Vintage Trump': President unloads on enemies at Phoenix rally