A man who fired shots into a crowded area because he was upset he couldn't get into a sold-out concert by the rapper Ice Cube was shot and wounded by a sheriff's deputy Sunday evening in Del Mar, Calif., police said.

The unidentified suspect was taken to a hospital. His medical condition was unknown, police told San Diego's FOX 5.

The concert was scheduled for the Del Mar Racetrack at the fairgrounds about 21 miles north of downtown San Diego. About 7:30 p.m. Pacific time, the operators of the racetrack tweeted that “the situation has been contained,” and the concert would be “moving forward as planned.”

A video posted on Twitter appeared to show a man holding a handgun, with two deputies nearby.

"Drop it!" a voice is heard saying, then the suspect falls to the ground.

The concert was scheduled to follow a full slate of horse races at the track, the station reported.

The gunfire happened as the final race of the day was underway, the San Diego Union-Tribune reported.