Three people, including a teenage boy wounded by police, were shot on Wednesday and five were arrested in an incident at the end of a packed end of Ramadan event in Philadelphia, authorities said, according to Fox News.

Shots rang out around 2:30 p.m. in the area of North 46th Street and Wyalusing Avenue at Clara Muhammad Square where about 1,000 people were gathered, Philadelphia Police Commissioner Kevin Bethel told reporters at the scene.

Officers were writing tickets at a nearby gas station when they heard 30 shots fired, Bethel said.

The officers saw two groups shooting at each other. One officer approached a 15-year-old boy, who opened fire. The officer returned fire and shot the teen in the shoulder and leg. Two other people were also shot during the chaos, police said.

A 22-year-old man was shot in the stomach and another minor arrived at a nearby hospital with a gunshot wound to the hand, authorities said. No one was killed.

The injured teen, as well as three men and a woman were arrested. Five weapons were also recovered, Bethel said, according to Fox News.

The shooting occurred during celebrations of Eid al-Fitr, a three-day holiday that follows the month of Ramadan, which were organized by the Philadelphia Masjid, a local mosque. The motive behind the shooting is not clear at this time.

"Eid should always be a time of joy for our Muslim neighbors — and I grieve for every member of the Philadelphia Muslim community whose celebration was shattered by gun violence today," Pennsylvania Gov. Josh Shapiro posted on social media.

The FBI and Bureau of Alcohol, Tobacco, Firearms and Explosives (ATF) have sent personnel to the scene to assist local authorities.