An Illinois police officer being investigated for his inaction as an intoxicated man berated a woman wearing a shirt with the Puerto Rican flag has resigned, the Forest Preserves of Cook County said Wednesday.

The agency said that Officer Patrick Connor resigned late Wednesday.

"It was truly appalling, gut wrenching, and a real wake-up call to everyone," County Board Commissioner Luis Arroyo Jr. said at a news conference Thursday in which he apologized for what happened.

The video of the June 14 encounter at the Caldwell Woods forest preserve in Chicago went viral, showing a man harassing Mia Irizarry, 24, for her choice of clothing, and asking if she's a citizen.

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

In the video, Irizarry, who rented space in the park for a birthday party, is heard telling the man who is yelling at her and coming closer, to get away from her. She tells a police officer who is watching the scene, "Officer, I feel highly uncomfortable, can you please grab him?" but the officer turns and walks away.

The Forest Preserves of Cook County had previously said the officer had been placed on desk duty as it investigated the incident.

Officials on Tuesday said that Connor was the officer being investigated. (His last name was previously identified as Conner in an emailed statement from the Forest Preserves.)

"The officer should have stepped in, and he should have done something," Forest Preserves Chief of Police Kelvin Pope said at a news conference Tuesday.

The video elicited strong reactions and there have been calls for the officer in the video be fired.

Even Puerto Rico Gov. Ricardo Rosselló weighed in, saying on Twitter that he was "appalled," and that "a Puerto Rican woman was brutally harassed by a bigot while an officer did not interfere."

The man who was tormenting Irizarry, identified by police as Timothy Trybus, 62, has been charged with assault and disorderly conduct. He was intoxicated at the time, the Forest Preserves of Cook County has said.

Pope said Tuesday that the investigation was launched on the same day that the incident occurred, but he said Connor was placed on desk duty on June 24, or 10 days after the incident. Officials clarified Thursday that the delay occurred because Connor went on a planned vacation immediately following the incident and was put on desk duty as soon as he returned.

Pope also said Connor was disciplined in the past for working a part-time job and for not carrying proper credentials, but not for anything of this nature.

Puerto Rico is a U.S. territory, and its residents are American citizens. President Woodrow Wilson in 1917 signed into law the Jones-Shafroth Act, granting U.S. citizenship to residents of Puerto Rico.

CORRECTION (July 12, 2018, 5:25 p.m. ET): An earlier version of this article misstated the day that Officer Patrick Connor resigned. It was Wednesday, not Tuesday.