This is an archived article and the information in the article may be outdated. Please look at the time stamp on the story to see when it was last updated.

CNN — Jeronimo Yanez, the Minnesota police officer who fatally shot Philando Castile during a traffic stop last year, was found not guilty of second-degree manslaughter Friday. He also was acquitted of two counts of intentional discharge of firearm that endangers safety. Castile’s death garnered widespread attention after his girlfriend broadcast the shooting’s aftermath on Facebook Live.

“I had no other choice. I didn’t want to shoot Mr. Castile. That wasn’t my intention,” Yanez said while wiping tears from his eyes, CNN affiliate WCCO reported. “I thought I was going to die.”

An audio recording captured Castile telling Yanez that he had a gun in the car, and Yanez telling Castile not to reach for it.

“It’s your testimony today that you saw Mr. Castile pull out an object?” prosecutor Rick Dusterhoft said Friday.

“It was a gun,” Yanez said.

“You said he pulled it out?”

“Correct,” Yanez said.

“And he said he wasn’t (pulling it out)?”

“Correct, but it doesn’t always mean that’s what he was doing,” Yanez said.

The shooting became known across the nation because the aftermath was streamed live on Facebook by Castile’s girlfriend. The video went viral, sparking protests and renewing criticism of the use of deadly force by police, especially against African-American men.

Yanez was working for the St. Anthony police department when he pulled over Castile on July 6 because he looked similar to a robbery suspect. Castile’s girlfriend, Diamond Reynolds, was in the passenger seat and her young daughter was in the back.

Reynolds testified that Castile was reaching for his ID in his back pocket when he was shot. He had a permit to carry a firearm in his wallet.

The Facebook video that Reynolds shot captured the dying Castile insisting that he hadn’t been reaching for his handgun.

While Yanez remained firm that he saw a gun, he acknowledged he was under tremendous stress during the incident.

Yanez said he had “tunnel vision” after Castile said he had a gun.

“What goes through your mind when someone tells you they have a firearm?” Dusterhoft asked.

“It changes the dynamic of the traffic stop,” Yanez responded.

Prosecutors tried to show that Yanez didn’t follow all the proper procedures and that his comments to investigators differed from day to day.

Dusterhoft ended his cross-examination by recounting the final moments of Yanez holding his gun over Castile before the first responding officers from another department arrived on scene soon after the incident.

The incident was one of several similar shootings last summer: On July 5, Alton Sterling was shot and killed outside a convenience store in Baton Rouge, Louisiana, by police responding to a report of a man with a gun. A bystander filmed that deadly encounter.