Kapelsohn said it was possible Castile didn't have his hand in or near his pocket at that point.
Other testimony Thursday focused on where other officers who responded to the shooting spotted Castile's gun after his body was removed from the auto.
Yanez said he meant to say he saw the top of the gun's slide rather than the barrel.
Prosecutors may wrap up their case Thursday against a Minnesota police officer charged with manslaughter in the death of a black motorist.
Kapelsohn, called by the defense, said officer Jeronimo Yanez was "justified" in shooting and "used reasonable force". Yanez had pulled the 32-year-old cafeteria worker over because of a faulty brake light, after following him for 2 miles before activating his lights and sirens in July 2016.
The instructor at the gun range in Ramsey where Castile took his permit-to-carry safety class also testified Thursday.
KARE 11's Lou Raguse said during Yanez's testimony, Castile's family looked on, completely composed.
Video from Yanez's squad vehicle dashboard camera showed that he approached the driver's window while Kauser went to the passenger side and told Castile of his defective taillight.
Part of Yanez's defense was highlighting that THC - the active chemical in marijuana - had been found in Castile's system after his death; therefore, Castile was high during the traffic stop and culpable for his fate.
Yanez is charged with second-degree manslaughter and two felony counts of risky discharge of a firearm.
Prosecutors called Yanez's actions unreasonable. After Castile told the officer he had the gun, Yanez told Castile, "OK, don't reach for it then", and, "Don't pull it out" - a response Kapelsohn described as "moderate".
Two Roseville police officers, including the one who says he actually removed the gun, said they saw it hanging out of Castile's pocket when officers were preparing Castile's body to be loaded onto a gurney.
Police officer Jeronimo Yanez.
Kapelsohn told jurors if they decide Yanez saw a gun, then he believed his life was in jeopardy and was justified in shooting. He added it would be reasonable to assume Castile's plan was to fire the weapon. Once he saw Castile's hand on the gun, Dutton explained that de-escalating the situation was no longer an option. He said Castile ignored his instructions not to reach for the gun.
The aftermath of the shooting was streamed live on Facebook by Castile's girlfriend and the video went viral, sparking protests nationwide and renewing criticism of the use of deadly force by police, especially against African-American men.
After following Castile in his marked squad vehicle for two miles, Yanez discovered Castile had a broken taillight and used the traffic violation as a reason to pull him over to investigate further.
Dutton said reviewed he reviewed all the videos, transcripts and police reports.
"The individual had a gun, (Yanez) didn't have time to (figure out) what his intention was", Dutton said.
"It changes the dynamic of the traffic stop", Yanez responded.
Dusterhoft was able to confirm with Olson that Reynolds had learned only an hour prior that Castile had died when she told him she was hungry.
About 100 people are packed into the courtroom Friday, including 40 family members, 24 reporters and eight attorneys. He rejected prosecutor Jeff Paulsen's assertion Friday that the central question in the case is whether Yanez saw Castile's gun. Prosecutors have portrayed Castile as being cooperative when he volunteered to Yanez early during the stop, "Sir, I have to tell you, I do have a firearm on me".
"So are you saying that when Officer Yanez said, 'I don't know where the gun was, ' he really did know where the gun was?"
Kapelsohn said three-eighths of inch of the butt of the gun was left below the lip of the pocket.
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.
The last witness to take the witness stand Friday was BCA agent Christopher Olson, who interviewed Reynolds after the shooting.
The state rested its case against Yanez on Thursday morning.