The assault happened Oct. 5 outside Santa Monica police headquarters on Olympic Drive. Police say the officer was heading outside to talk to someone when the suspect showed up at the front door.
During the encounter, video shows the officer ask the suspect what he had in his jacket.
"What's in your jacket? I'm kind of nervous with your hand in your jacket like that," the officer tells the suspect.
The suspect responds by saying "You're nervous?" and then lunges at the officer.
"Without warning, the individual attacked the officer while pulling a knife from his clothing. The suspect slashed and stabbed the officer," police said in a statement.
A struggle ensues and the officer fights back, video shows. He then fatally shoots the suspect.
Prior to the stabbing, surveillance video shows the suspect had assaulted a Target employee inside a store and stole kitchen knives.
The officer was taken to a hospital and released the following day. He was stabbed multiple times, but his protective vest helped him survive the attack.
The shooting is under investigation by the Los Angeles County District Attorney's Office.