Newly released surveillance video captures a deadly encounter between police and a man who was suspected in a Boston terror plot.

Police say they fired two shots at 26-year-old Usaamah Rahim in a CVS parking lot after he pulled a knife on police and ignored officers’ orders to stop advancing toward them.

Surveillance video appears to show that officers backed away from Rahim before opening fire on the suspect, killing him.

Rahim had been under surveillance in connection with a terror investigation. He was believed to be plotting to kill police.

Watch the surveillance video above.

TRENDING on Fox News Insider:

Terrified Man Calls 911 Because His Cat Is 'Too Aggressive'

'Guns Save Lives': Bolling Blasts Liberals on the Second Amendment

See Why This Country Music Star Is Getting a Purple Heart