Updated

A Minnesota police officer who shot and killed a black driver just after the man told him he had a gun “did what he had to do,” a defense attorney argued Monday.

Officer Jeronimo Yanez fatally shot Philando Castile, a 32-year-old cafeteria worker, during a traffic stop on July 6, 2016. The shooting drew widespread attention because Castile’s girlfriend livestreamed the aftermath on Facebook.

AUTHORITIES IDENTIFY OFFICER JERONIMO YANEZ AS MAN WHO FATALLY SHOT BLACK MAN IN MINNESOTA

Prosecutors earlier argued Yenez never saw Castile with a gun, and had plenty of options that did not involve shooting Castile.

The manslaughter trial went to a jury after both sides gave closing arguments Monday.

Castile looked like a man who robbed a convenience store days earlier, Yanez’s attorney Early Gray argued to the jury. He said Castile ignored Yanez’s orders and reached for his gun while high on marijuana, adding Yanez felt his life was in danger during the situation and “did what he had to do.”

Prosecutor Jeff Paulsen argued that autopsy evidence showed a bullet wound to what would have been Castile’s trigger finger, and that there was no corresponding bullet damage nor wounds in the area of Castile’s right shorts pocket, where he carried his gun.

MN OFFICER BACK ON JOB MONTH AFTER SHOOTING PHILANDO CASTILE IS 'LEVEL-HEADED,' CHIEF SAYS

Paulsen asked the jury to consider what might have happened if Yanez, when told of the gun, would have stepped back a few feet to better assess the situation. Officer Yanez might have heard that Castile was reaching for his wallet, he added.

Castile had THC, a component of marijuana, in his blood when he died.

Conviction of the officer’s manslaughter charge requires the jury to find Yanez guilty of “culpable negligence,” which the judge described in jury instructions as gross negligence with an element of recklessness.

After three white alternates were dismissed after closing arguments, the 12-member jury included two black and ten white people.

Fox News’ Matt Finn and The Associated Press contributed to this report.