A man opened fire at a rock concert and Fourth of July celebration, hitting eight spectators and causing a panic that injured several people.

"I didn't hear any guns, but I thought I heard firecrackers," said Kevin Martin, who ducked inside an exhibition building to escape the mayhem. "Then I saw 1,500 people run right by me. . . . I almost got run over."Police arrested 23-year-old Jamal Johnson. No motive was released.

The gunfire erupted shortly after 8 p.m. Saturday in the carnival section of the sprawling Alameda County Fair, where several thousand were awaiting the fireworks and concert by singer Peter Frampton.

The crowd scattered as the bullets were fired. Sixteen people were injured, most as a result of the ensuing melee, authorities said. None of the injuries was considered life-threatening.

The suspect was apprehended after being spotted and followed by a carnival worker who alerted a sheriff's deputy.

Alameda County sheriff's Sgt. Jim Knudsen said investigators were not sure of an earlier report that the first intended target appeared to have been a woman with whom the suspect had been arguing.