CHAPEL HILL, N.C. (AP) _ Gunfire erupted as a street festival was ending Sunday, wounding two people and sending the crowd running for cover, police and witnesses said.

''A couple of people fired automatic weapons,'' said Chapel Hill Police Sgt. Shauna Winston. ''One person was shot in the foot, another person was shot in the thigh.''

The victims were not immediately identified. One was taken to a hospital and the other fled the scene, Winston said.

The shootings happened in a driveway on a street where the Apple Chill Festival was being held. Merchant Jeff Marcinowski said someone started shooting out of a car.

''It seemed like he was just shooting into the air, just blowing off steam,'' he said. ''It was just nuts. For about 10 minutes, people were panicking, screaming and running for cover. It was a small riot.''

Authorities confiscated at least eight firearms after the violence erupted. Police said the incident may have stemmed from a gang dispute.

Chapel Hill Police Lt. Robert Frick said shootings had also occurred after the Apple Chill festivals in 1991 and 1992.