Armed with a rifle carrying a 30-round magazine, Brandon Clark fired five shots into the employee entrance of Bakersfield Heart Hospital last month after staff refused to let him in, says a recently released court document.

Clark, 44, was shot by police shortly afterward, and a toxicology screen of his blood turned up methamphetamine, according to a probable cause declaration filed in Kern County Superior Court. A meth pipe was found in his vehicle.

The Big Sur resident, who was initially in critical condition, has been recovering at a local hospital and has pleaded not guilty to 16 felonies, including 10 counts of assault with a semi-automatic firearm on a person.

In addition to being armed with a Kel-Tec .223-caliber rifle with pistol grip, Clark was also carrying a concealed handgun, according to the declaration. The document states he has prior felony convictions and has served time in prison. 

The Dec. 1 incident began unfolding when Clark arrived at his mother's house in Bakersfield. No one was home, and he fired a single shot at her residence, police said.

He then got a ride from a person he didn't know to the Heart Hospital, located at 3001 Sillect Ave. Police said they believe he went there to speak with his mother.

According to police, Clark fired five rounds into a glass door then entered the hospital and pointed the gun at several people. He walked back outside, where he was confronted by police.

Two officers fired a total of six rounds in his direction, police said. It's unclear how many rounds struck Clark.

No officers, or any others at the hospital, were harmed. Police said they don't believe Clark intended to harm his mother.

His next hearing is scheduled for Jan. 26. 

Jason Kotowski can be reached at 661-395-7491. Follow him on Twitter: @tbcbreakingnews.