A sheriff's deputy shot a man Sunday after he pulled a gun and fired several shots when he was told he couldn’t get a ticket to the sold-out Ice Cube concert at the Del Mar Fairgrounds, authorities said.

Sheriff’s officials said the man, who they identified early Monday as 22-year-old Daniel Elizarraras of Escondido, had gone to a ticket window around 6:40 p.m., hoping to buy a ticket to the concert, and became upset when he was told none were available.

“An argument ensued and nearby deputies responded,” a sheriff’s statement said. “The man pulled out a silver plated semi-automatic handgun and fired several shots into a crowded area. Deputies engaged and returned fire.”

The shooting, which occurred just seconds after the final race of the day, created a chaotic scene at the venue. Elizarraras was transported to Scripps Memorial Hospital in La Jolla and the sheriff’s office said his condition is “stable and he is expected to survive.” The shooting is being investigated by the Sheriff's Homicide Unit..

Videos posted on Twitter showed a deputy pull her gun and fire what sounded like four rounds after a man standing near an entrance gate is seen pointing a weapon in the air.

The shooting took place just after the 10th race. In a TVG broadcast of the race posted on Twitter, an announcer can be heard repeatedly saying, "There's gunfire at the track,” as horses continued along the turf course after passing the finish line.

Ice Cube performs during the BIG3 Championship at the Barclays Center on August 24, 2018 in Brooklyn, New York. Getty Images

The sold-out show, drawing about 18,000 people, was part of the 2018 Del Mar Summer Concert Series. The concerts take place at the Seaside Stage, which is located near the west end of the racetrack's Grandstand.

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.” By 8:30 p.m., the rap concert had begun.

Police scanner traffic indicated that one suspect was down and was being taken to the hospital and that no other suspects were being sought.

A witness said some concertgoers appeared to leave the arena in the aftermath of the shooting incident. They found a massive gridlock in the parking lot where gates were blocking exits.

Del Mar had invited fans who couldn’t get in to the sold-out show to watch the concert on TVs throughout the track, including in the paddock area.

The crowd at Del Mar on Sunday was among the largest of the season, approaching the meet-high of 33,112 for opening day. Del Mar officials said racing would proceed as scheduled on Monday, the last day of the summer season.

In a statement, Del Mar Thoroughbred Club said, “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 Sheriff’s Department regarding possible active shooter incidents.”

Twitter: @karenkucher

(619) 293-1350

karen.kucher@sduniontribune.com

UPDATES:

9:10 a.m. Monday: This article was updated with additional details, including the identification and condition of the suspect.

10:08 p.m.: This article was updated with additional details.

8:10 p.m.: This article was updated with additional details.

7:30 p.m.: This article was updated with additional details.

This article was originally published at 7:10 p.m.