Josh Cobin's lawsuit claimed he was further injured when Phoenix police shared memes of the incident on social media.

Phoenix, AZ – A judge dismissed a lawsuit against the city of Phoenix and several police officers filed by rioter who was shot in the crotch with a pepperball while he was protesting at a rally supporting President Donald Trump.

KPHO captured the Aug. 22, 2017 altercation between Joshua “Pepperballs” Cobin and officers outside of the Phoenix Convention Center, where President Donald Trump was holding a rally.

Cobin, who was wearing a gas mask during the incident, ran in front of police lines and refused to disperse when ordered to do so, The Arizona Republic reported.

“My thought process is that that was not unlawful assembly, and that I had every right to be there,” he told KPHO the day after the rally.

According to court documents, Cobin ran over to a tear gas canister and attempted to kick it at police. He ultimately picked the canister up, and threw it at officers, The Arizona Republic reported.

Cobin then hurled a second canister, and later admitted to KPHO that he sustained second-degree burns from the canisters’ hot metal.

“That tear gas was in the way of myself and other peacefully assembled protesters being there,” he said. “I don’t equate kicking or putting back tear gas canisters as attacking police.”

The video showed Cobin kicking another gas canister at the officers, who responded by firing a less-lethal round at the man, hitting him hear his groin.

Then a man in a Colin Kaepernick jersey ran in, and helped Cobin out of the roadway.

“It missed everything important, so it was just a couple inches too high,” he later told KPHO. “It was just more of a shock and, you know, your body going into the turtle defense mode kinda thing…”

The GoDaddy sales and support representative was arrested at his workplace two days after the rally on three felony counts of aggravated assault on a peace officer, and one misdemeanor charge of unlawful assembly.

He has since pleaded guilty to the misdemeanor count, after prosecutors agreed to drop the felony offenses.

“Yes, I overstepped the line I would say, hence my plea there,” he told KPHO, before he placed blame on officers for their strong response.

“The police, as well as people on the other side, tried to paint me as a terrorist or an ANTIFA member, which I am not,” he told KPHO.

Cobin noted that he was shot in the back with another “pepperball” round that night.

His lawsuit said that in addition to the injuries he sustained from the pepperball, he suffered serious public humiliation after he found mocking memes of the incident being shared on social media by Phoenix police officers, KPHO reported.

“And then to see officers posting about it and mocking me was even worse,” Cobin complained. “Found three current officers who had posted in the aftermath of the event about me. Honestly, that really was the final straw.”

On Wednesday, the judge dismissed Cobin’s lawsuit because there was no “factual allegation in the complaint,” KPHO reported.

The judge said that in order to pursue a lawsuit Cobin need more than “an unadorned the-defendant-unlawfully-harmed-me accusation.”