HUNTINGTON BEACH, Calif. (AP) — Police officers shot and killed an armed man in the sand in front of dozens of terrified witnesses, many who had gathered at Huntington Beach for the U.S. Open of Surfing.

Officers responding to reports of a man with a gun made contact with him Saturday afternoon and when he refused to comply with numerous commands they opened fire, the city’s police spokeswoman Jennifer Carey said in a statement.

The man was taken to a hospital where he was pronounced dead. He has not been identified.

A gun was found at the scene, she said.

Witnesses said several shots rang out south of the pier, near the bicycle and pedestrian pathway, after the surfing competition had wrapped up for the day. One witness video showed the man rolling on the sand, appearing to reach for an object before officers fired several rounds, striking him, as people yelled and screamed.

“We started hearing pop, pop, pop,” Hector Tovar told The Orange County Register. “I thought it was fireworks, that’s how many rounds there were.”

The officers’ body cameras were activated during the shooting and the footage will be examined by Orange County Sheriff’s investigators, who will work with Huntington Beach police to probe the shooting, officials said.