CHICAGO — U.S. Border Patrol Commander Gregory Bovino is under intensifying scrutiny in Chicago after he was recorded on Thursday throwing what appeared to be a tear gas canister at protesters, leading attorneys to accuse him of violating a temporary restraining order that bans the use of tear gas, pepper spray and other tactics against journalists and protesters unless under imminent threat.

The Department of Homeland Security said in a statement that Bovino was struck in the head by a rock thrown by “hostile and violent” protesters, though several witnesses challenged that contention.

On Friday, Bovino was ordered to appear before a federal judge on Tuesday.

“The Court orders Defendants to produce Defendant Gregory Bovino, in person, for this hearing,” U.S. District Judge Sara Ellis stated in a written order.

Greg Bovino, US Border Patrol's commander-at-large, looks on during a protest outside the Immigration and Customs Enforcement facility in Broadview, Ill. on October 3.Greg Bovino, US Border Patrol’s commander-at-large, looks on during a protest outside the Immigration and Customs Enforcement facility in Broadview, Ill. on October 3.Octavio Jones / AFP via Getty Images

Bovino was already under court order to sit for a deposition in the same federal case alleging excessive use of force by immigration officers.

“This action violates multiple paragraphs of this Court’s TRO,” plaintiffs’ attorneys wrote to a federal judge on Thursday, including in their filing a link to a video and a still image of Bovino throwing a canister. DHS and CBP did not immediately respond to a request for comment.

In the city’s Little Village neighborhood on Thursday, Bovino, wearing military fatigues and no helmet, appears to throw a canister at a crowd protesting an immigration arrest. Immigration officials said Bovino took action after rocks were thrown at him and “rioters” shot “commercial artillery shell fireworks” at the officers.

“The mob of rioters grew more hostile and violent, advancing toward agents and began throwing rocks and other objects at agents, including one that struck Chief Greg Bovino in the head,” a statement from the Department of Homeland Security said. “Border Patrol agents repeated multiple warnings to back up and that chemical agents would be deployed if warnings were ignored.”

Videos posted on social media and obtained by NBC News capture some of the scene preceding the action. While videos show objects falling near agents, none show Bovino being hit before throwing the canister.

Illinois state Sen. Celina Villanueva, who was at Thursday’s clash in Little Village, said authorities did not issue a warning before deploying tear gas.

“They started throwing tear gas at people even as people were running away. They grabbed people who were running away to get to safety,” she said. “None of it was announced, they don’t even identify themselves so no, everything that they claim are lies.”

Another witness, Yani Sotelo, captured the scene in a lengthy video she posted on social media.

“No one hit him with a rock,” she said in a text message. “You can clearly see in the video.”

Ellis had previously ruled that federal immigration agents must wear body cameras if they had them and that the cameras must be turned on. It was unclear if Bovino or any other agents present were wearing body cameras or if they were turned on. CBP did not immediately respond when asked about it.

Bovino, considered the lead in what federal authorities dubbed “Operation Midway Blitz,” has become a ubiquitous presence in the Chicago area. The Border Patrol chief frequently sits for local news interviews, including those aired on the most popular prime-time channels.

This week he made no apologies for how agents have conducted themselves and suggested at one point that if people don’t want to get hit by a pepper ball, “Don’t protest.”

The “use of force I’ve seen … has been exemplary. By exemplary, I mean the least amount of force necessary to accomplish the mission,” Bovino told a local CBS reporter in an interview aired Thursday. The reporter pressed Bovino on whether he believed that was the case around the Broadview facility. “I do,” he said.

“If someone strays into a pepper ball, then that’s on them: Don’t protest. And don’t trespass,” Bovino said.

Natasha Korecki

Shaquille Brewster

Colin Sheeley contributed.