SAN DIEGO (CBSLA/AP) — A 22-year-old man who was told no more tickets were available for an Ice Cube concert at the Del Mar Thoroughbred Club Racetrack Sunday night was wounded by San Diego County Sheriff’s deputies after he fired his gun into a crowd, authorities said.

Sept. 2, 2018. (Andrea Moreno/Twitter)

Daniel Elizarraras, 22, of Escondido came to the ticket window at the Del Mar Fairgrounds about 6:40 p.m., the department said in a news release.

Shortly after he was told there were no more tickets, an argument ensued and nearby deputies came to the scene. The man pulled out a silver-plated semi-automatic handgun and fired several shots into an area crowded with people, the department said. The deputies then shot him.

He was taken to Scripps Memorial Hospital La Jolla, SDSD reports. According to KFMB-TV, he is expected to survive.

It appears no one else was hurt, the department said.

Witnesses told KFMB that the suspect fired three shots into the air. A video of the incident that was posted on Twitter records the sounds of several shots being fired before a man falls to the ground. Two deputies appear to holster their guns as one shouts at a gathering crowd to “get back, get back, get back.” In the ensuing chaos, the crowd can be seen throwing punches as deputies try to maintain order.

In a broadcast of the track’s final race of the day that was posted on Twitter, an announcer can be heard saying, “There’s gunfire at the track,” as horses move along the turf course, the San Diego Union-Tribune newspaper reported.

At 7:22 p.m., the Del Mar Racetrack tweeted that the “situation has been contained” and said the concert “is moving forward as planned.”

The situation has been contained. The concert is moving forward as planned.

“We are aware of an ongoing San Diego Sherriff’s Department investigation into an incident on the Del Mar Fairgrounds today in advance of a concert featuring the artist Ice Cube.

“As is our special events protocol, substantial law enforcement and private security was on site in anticipation of the event. In light of the circumstances that unfolded involving one individual with a gun, we take consolation in the fact that no patrons, officers or security personnel were injured in the incident.

“We also are thankful for the work and training our personnel have done with the Sherriff’s Department regarding possible active shooter incidents.

“We will continue to fully cooperate with the Sherriff’s Department in their investigation and will refer all questions concerning the incident to them.

“Del Mar’s final day of racing will begin at 2 p.m. tomorrow as scheduled.”

(@Copyright 2018. The Associated Press contributed to this report. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.)