The second man charged in a 2024 shootout near the Allentown Dominican Festival has pleaded guilty and been sentenced to prison.

Miguel Ovalles Ubri, 29, of Allentown was awaiting trial on charges of aggravated assault and reckless endangerment in the shooting, which injured six people.

He pleaded guilty Tuesday to those charges and was immediately sentenced by Judge Anna-Kristie Marks to four to 10 years in state prison, according to the Lehigh County district attorney’s office.

Ovalles Ubri “fully cooperated with the investigation and was legally entitled to carry a firearm,” DA Gavin Holihan said in a news release, noting that the investigation determined Ovalles Ubri did not instigate the shooting.

The other man involved in the shootout, Yunior Peralta-Quintana, 23, was sentenced March 19 to 40-80 years in state prison. A jury in January convicted him of attempted murder, aggravated assault, reckless endangerment, carrying a firearm without a license and witness intimidation.

Police responded to the 100 block of North Seventh Street around 6:45 p.m. Aug. 25, 2024, as the gun battle between Peralta-Quintana and Ovalles Ubri was raging, not far from where the Allentown Dominican Festival was taking place.

Two officers fired their guns amid the shootout, but none of the people injured was shot by the officers, according to authorities. Holihan later found their use of force was justified.

Police body camera video captured the chaotic scene, as festivalgoers ran for cover amid the gunshots. Authorities said 32 bullets were fired: 20 by Peralta-Quintana and Ovalles Ubri, and another 12 by the responding officers.

Holihan credited the quick response by police officers patrolling the festival, including applying tourniquets to the shooting victims, saying it “most certainly saved lives that day.”

The investigation into the shootout was led by Allentown police Detective Theodore Kiskeravage and the Lehigh County Homicide Task Force, and was prosecuted by Senior Lehigh County Deputy District Attorney Patricia Turzyn and Assistant District Attorney Kinda Alhanna.