Moment Zhanyuan Yang who was armed with crossbow and a knife is shot by police after smashing his car into Chinese consulate in San Francisco

Shocking footage shows the moment a man armed with a knife and crossbow is killed by police after driving a car into the Chinese consulate in San Francisco.

Zhanyuan Yang, 31, was shot by police after he drove a blue Honda sedan into the building’s lobby on Oct. 9 and then shouted, “where is CCP?”

Police have since confirmed he was carrying a 3.5-inch knife and had a crossbow in the back of the vehicle at the time of the crash.

Bodycam video shows the Chinese national attempting to cut officers with the knife before being fatally shot.

The incident began around 3pm when Yang rammed into the visa services section of the building, narrowly avoiding injuring members of the public.

Police have released bodycam footage showing Zhanyuan Yang being shot by police after driving a car into the Chinese consulate in San Francisco.

Police have released bodycam footage showing Zhanyuan Yang being shot by police after driving a car into the Chinese consulate in San Francisco.

Terrified bystanders were seen fleeing the Chinese consulate in San Francisco after making several 911 calls

Terrified bystanders were seen fleeing the Chinese consulate in San Francisco after making several 911 calls

Footage from a bystander shows members of the public fleeing the building in panic before police arrived.

In the background, a consulate guard can be seen trying to reason with Yang, who stands among the wreckage of the crash.

Witnesses said Yang got out of the car bleeding from his head and shouted, “Where is the CCP?” – an abbreviation for Chinese Communist Party.

Police arrived after multiple 911 calls, where callers reported a man with a gun.

In audio of one of the calls, a You hear a member of the public begging for a SWAT team.

Officers then arrive on the scene and newly released footage shows their encounter with Yang. As Carrasco approaches, he yells, “Get on the ground,” before asking if Yang has a gun.

He then tries to force Yang against the wall with the help of other officers, and a struggle ensues.

Suddenly Yang breaks free and it becomes clear that he is armed with a knife. Police later determined that he also had a crossbow in the backseat of his car.

The video shows Yang begin to cut with the knife and Carrasco jumps back, narrowly avoiding being stabbed.

Patrol Officer Troy Carrasco fatally shot Yang after he began slashing at him and a guard with his knife

Patrol Officer Troy Carrasco fatally shot Yang after he began slashing at him and a guard with his knife

Yang collapsed at the scene and later died in hospital.  The shooting is now the subject of several official investigations

Yang collapsed at the scene and later died in hospital. The shooting is now the subject of several official investigations

San Francisco Police Captain Jason Sawyer said he was 'grateful' for his officers' actions that prevented further possible victims

San Francisco Police Captain Jason Sawyer said he was ‘grateful’ for his officers’ actions that prevented further possible victims

Yang attacks again and comes dangerously close to stabbing a consulate guard, who also tries to restrain him.

At this point, Carrasco draws his weapon and fires two shots at the perpetrator, sending him into a heap on the ground.

Carrasco pulls away and lets out ‘shots fired’ as he tries to catch his breath.

As he gets to his feet, other officers can be seen trying to handcuff Yang, who is slumped on the ground.

“You should have told me he had a knife,” Carrasco shouts at his fellow officers.

Another bodycam video from an officer who arrived just as Carrasco pulls the trigger captures the moment Yang falls to the ground.

As he bends down to put the handcuffs on Yang, you can hear the office groaning in pain as he lies in a pool of his own blood. Officials later confirmed that Yang died at the hospital.

The shooting is now the subject of several investigations by police and the San Francisco District Attorney’s Office.

But at a news conference, Capt. Jason Sawyer said he was “grateful” for his officers’ actions.

1697784392 897 Moment Zhanyuan Yang who was armed with crossbow and a

Yang rammed a blue Honda sedan into the consulate’s visa section, but miraculously no one else was injured

Yang was armed with this 3.5-inch knife during the incident

Police found this crossbow and a load of arrows in the back seat of the car used in the attack

Police confirmed today that Yang was armed with a knife and a crossbow at the time of the attack

“This was a highly unusual event that could have easily caused many more victims and I am grateful for the actions of our officers and the private security guards who risked their personal safety to protect the lives of the public,” Sawyer said .

Police Chief William Scott added: “If we believe there is an active attacker, we will do everything possible to immediately stop that threat so that we do not lose any life.”

An exact motive for Yang’s attack has yet to be released, but he had a number of replica firearms and a book on political assassinations in his possession.

Yang’s roommate, who declined to be identified, told the San Francisco standard he was “very reserved” and played video games.

“If he was radicalized, it was recently,” she said.