An Illinois police officer resigned after facing public criticism for not helping a woman who was harassed for wearing a Puerto Rico flag shirt.

A now-viral video showed Officer Patrick Connor failing to intervene when a man identified as Timothy G. Trybus began to harass 24-year-old Mia Irizarry, calling her un-American for wearing a Puerto Rico shirt.

“Effective today, Officer Patrick Connor no longer serves in the police department of the Forest Preserves of Cook County,” the agency tweeted on Wednesday. “He resigned late today. But that isn’t where our works ends.”

Effective today, Officer Patrick Connor no longer serves in the police department of the Forest Preserves of Cook County. He resigned late today. But that isn’t where our work ends. — Forest Preserves (@FPDCC) July 12, 2018

Irizarry said she had rented out a pavilion in a Forest Preserves of Cook County park last month to celebrate her 24th birthday, CNN reported Thursday.

Trybus is seen in the video harassing her for wearing a shirt with the Puerto Rico flag. She posted a video of the altercation on Facebook in June and it has since been viewed more than 1.5 million times.

“You should not be wearing that in the United States of America,” Trybus says in the video, moving closer to her. “Are you a citizen? Are you a United States citizen?"

Irizarry tells him Puerto Rico is part of the United States. The island is a U.S. commonwealth, and Puerto Ricans are American citizens.

Irizarry asks Connor, the first officer on the scene, to help her because she feels unsafe.

"Officer, I feel highly uncomfortable,” she says.

Connor is then seen walking away.

"I do not feel comfortable with him here. Is there anything you can do?" she asks Connor.

“You're not American, if you were American you wouldn't wear that," Trybus says to her.

Another officer eventually intervenes, asking for Trybus's ID.

Connor then writes down Irizarry’s statement of the events.

He says he was there for a separate incident and notes that she was not being attacked.

Trybus, who was reportedly intoxicated during the altercation, was arrested and charged with assault and disorderly conduct, according to CNN.

Cook County Commissioner Jesús "Chuy" García called for the charges against Trybus to be elevated to a hate crime.

"A charge for simple assault or disorderly conduct is not sufficient," García told CNN. "We cannot allow that ugly rhetoric to be the norm in Cook County."

U.S. Rep. Luis Gutierrez Luis Vicente GutierrezDem tears into Kelly over immigrant comments: 'He eats the vegetables that they pick' WATCH: Gutiérrez says ‘lonely’ Trump can cry on KKK’s shoulder over WH departures Read Trump's remarks at Gridiron dinner MORE (D-Ill.) wrote a letter to the Department of Justice, calling on it to “investigate to see if federal civil rights charges are warranted."