Sheriff's deputies shot a man before a sold-out concert by Ice Cube during the last race of the day at Del Mar Racetrack north of San Diego, authorities and track officials said.

The San Diego County Sheriff's Department said the man fired several rounds from a semiautomatic handgun when he was told that no more tickets for the concert were available. Deputies returned fire, and the man was taken to a hospital with unknown injuries. The concert went on as planned after a delay.

A spokesman for Del Mar Thoroughbred Club said the incident at about 6:40 p.m. (9:40 p.m. ET) led to a large law enforcement response as the last race of the day was under way.

On a broadcast of the race by TVG, a horseracing network, a man could be heard yelling "There's gunfire at the track! There's gunfire at the track! There is gunfire at the ..." before the sound cut out. TVG later reported that its crew was unhurt.

BREAKING ALERT: Shooting confirmed at the Del Mar racetrack in California. Victims confirmed. pic.twitter.com/P9vX0i7BIX — TheAnonJournal (@TAPAlerts) September 3, 2018

"I heard six shots to the right of us, outside the gates," a TVG announcer, Simon Bray, told the daily racing newspaper BloodHorse. "I jumped over the gate immediately. There were people running everywhere. And I got stuck in a stall with a kid who (was separated from) his parents. It was some scary stuff."