A San Francisco police officer lost consciousness when he hit his head attempting to stop a man from entering the Outside Lands music festival without paid admission in Golden Gate Park on Sunday, a police spokesman said.

Los Angeles resident Zachary Holland, 24, did not possess a paid admission for Sunday's event. Holland allegedly sprinted away from the event's security staff at the south entry gate of the festival around 4:30 p.m., according to San Francisco police spokesman Sgt. Michael Andraychak.

Several police officers saw Holland sprinting away from the event security guards and moved to intercept him, Andraychak said.

The officer closest to him reached out and grabbed Holland but was knocked to the ground, where the officer hit his head on a cement block wrapped with a piece of metal, according to Andraychak.

The officer lost consciousness for a brief period while Holland stumbled but continued running through a tunnel leading to the polo field, police said.

An event security officer tackled Holland and additional police officers closed in on him and took him into custody.

The injured officer regained consciousness at the scene and saw that a piece of Holland's shirt had been torn off and was still in his hand.

The officer was treated and released from the hospital, police said.

Holland was booked for felony obstructing or resisting an officer by means of threats or violence, battery on a peace officer, also a felony, resisting or obstructing a peace officer, a misdemeanor, and trespassing at a paid event, an infraction.

Over the course of the three-day festival, where musicians such as Elton John, The Black Keys and Kendrick Lamar performed, 77 people were cited for trespassing at a paid event, five people were cited for peddling without a permit, three were cited for alcohol drinking violations, and one person was cited for public urination, according to police.