(WARNING: The video above may contain graphic images and/or profane language.)

The Sacramento Police Department released Thursday body camera footage of last month's attempted murder of a Sacramento police officer.

On Feb. 22, the police department received several reports of a person walking with a knife in the area of Elvas Avenue and J Street in Sacramento.

Officers located Juan Heras-Castro, 33, in the area, where he was detained by officers. Police said the man had a knife in his possession, but was “calm and cooperative."

After questioning Castro, officers believed he may have been suffering from a mental health crisis. Castro was then transported to Mercy General Hospital for an evaluation, but was not detained in handcuffs because of his calm demeanor.

While being evaluated at the hospital, Castro ran out of the building and into a residential neighborhood. When an officer caught up with Castro, he became combative.

During the struggle, Castro removed the officer’s gun from the holster and fired the weapon three times. After the shots were fired, an off-duty firefighter driving by the incident assisted the officer and both were then able to regain control of the weapon and take Castro into custody, according to officials.

The officer suffered minor injuries during the incident and Castro was charged with attempted homicide on a police officer.