Pretoria, South Africa (CNN) -- Opening a third week of testimony, a gun dealer said South African Olympic athlete Oscar Pistorius had to know gun safety laws before purchasing his firearms and getting his gun licenses.
Sean Patrick Rens, who sold guns to Pistorius, said the athlete correctly answered a questionnaire.
Rens said Pistorius knew that it's not legal to shoot at unknown person seen breaking into your house, not legal to shoot at them if burglar bars separate you, but it is legal to shoot at them if there's no protection and they approach you with a weapon.
For it to be legal to fire, Rens said, "the attack must be against you, must be against a person, must be unlawful."
These points are important, because the Pistorius defense team must show that not only did he made a mistake but that the mistake was reasonable in order for him to be cleared of killing his girlfriend, Reeva Steenkamp.
Prosecutors and the defense are jockeying over whether Pistorius intentionally murdered Steenkamp, or killed her in a terrible but understandable accident.
There's no question that he shot her through a bathroom door in his house early on Valentine's Day last year, hitting her with three hollow-tipped bullets, one of which probably killed her almost instantly.
But for two weeks in court, his defense team has chipped away at every witness who casts doubt on his story that he thought Steenkamp was a burglar and mistakenly acted in what he believed was self-defense.
Prosecutor Gerrie Nel has put up witnesses ranging from the pathologist who performed the autopsy, to ex-girlfriend Samantha Taylor, who said Pistorius kept a gun by his bed and went to investigate a sound in the night, weapon in hand, at least once while she was dating him.
The senior police officer on the scene the night of the killing testified Friday, but it's not clear he did much for the prosecution case.
The police investigation sounded in court like a catalog of bumbling, bad judgment, poor memory and petty theft.
Former police Col. G.S. van Rensburg described how he found a police ballistics expert handling Pistorius' gun without wearing gloves and reprimanded the officer, who apologized and put a pair on.
And he said he was "furious" when at least one of the Olympic athlete's valuable wristwatches disappeared from his bedroom as police investigated the crime scene.
He "body searched" his fellow officers, their bags and their vehicles but was unable to find the watch, which was worth several thousand dollars.
He also said he had ordered the bathroom door through which Pistorius shot Steenkamp removed from the house, placed in a body bag and taken to his office, explaining, "The door is the most valuable evidence because the deceased was behind the door."
Earlier in the week, the defense attacked police handling of the door, implying that the evidence was unreliable because it was contaminated.
Van Rensburg resigned from the force in December after three decades, under fire for his handling of the door. Asked what he now did for a living, he choked up and said, "I am now coaching sports, and sports is my life."
Golden boy turned defendant
He's the 13th witness to testify for the prosecution in the murder trial of Pistorius, once South Africa's golden boy for the stellar track success that made him the first double amputee runner to compete in the Olympics.
Pistorius, 27, has pleaded not guilty to murder and three other weapons charges. Steenkamp, a model, was 29 when she was killed.
On Friday, Pistorius' lawyer Barry Roux ripped into van Rensburg's chronology of events on the night of the killing, presenting witness statements from three police officers whose accounts differed from van Rensburg's.
The former officer was so startled by the statement of police Sgt. Ntome Sebetha that he stared at Roux and said, "Amazing."
Later, Roux rattled van Rensburg so severely, pointing out clear differences between two pictures that the former officer said were the same, that van Rensburg refused to answer a question about how many keys were in another photograph.
"It's not a trick question," Roux said. "There's one key there."
The former police colonel first took the stand Thursday and said paramedics were there when he arrived at Pistorius' address about 3:55 a.m., but Steenkamp was dead.
As he testified, the prosecution showed more than 100 police photographs taken at Pistorius' house after the killing, including the sprinter's 9 mm handgun, still cocked and ready to fire, on a bloody towel or bathmat on a blood-spattered floor.
On Friday, the court was shown a photo of a toilet covered in blood, but only van Rensburg saw photos of Steenkamp's body and closeups of her injuries.
Those gruesome pictures were not displayed on courtroom monitors.
Even so, Pistorius kept his head down, shielding his eyes with one hand, while prosecutor Nel talked the former police officer quickly through the sheaf of photos on the witness stand.
Pistorius vomited several times last week as pathologist Gert Saayman described Steenkamp's fatal wounds, and again when pictures of the injuries were accidentally displayed on monitors in court.
Gun at his bedside
The case against Pistorius is largely circumstantial, Nel said in his opening statement last week. Pistorius and Steenkamp were the only people in his house when he killed her.
Nel has been building a picture of what happened through the testimony of experts, neighbors who heard screaming and bangs that night, current and former friends of Pistorius' and a security guard who sped to the scene because of reports of gunshots.
Many prosecution witnesses' accounts are consistent with Pistorius' version of events: that he got up in the night, went out to his balcony to get a fan, came back inside and heard noises in the bathroom that he thought came from an intruder.
He said he took the gun and fired while calling for Steenkamp to call police. When she didn't answer, he realized she could have been the person in the bathroom, he said.
Neighbors said they heard a woman screaming before the shots were fired. But the defense is proposing that what neighbors thought was Steenkamp screaming in fear for her life was in fact Pistorius when he realized what he had done.
And the defense says that the sounds neighbors heard were not the gunshots, but the cricket bat hitting the door as he tried to rescue her.
Pistorius and at least two neighbors made phone calls to security after the shooting, allowing the defense to use phone records to establish a timeline of events.
Judge Thokozile Masipa will decide the verdict. South Africa does not have jury trials.
In South Africa, premeditated murder carries a mandatory life sentence with a minimum of 25 years. Pistorius also could get five years for each gun indictment and 15 years for a firearms charge he also faces.
If he isn't convicted of premeditated murder, the sprinter could face a lesser charge of culpable homicide, a crime based on negligence. The sentence for culpable homicide is at the judge's discretion. The trial looks set to go on for several more weeks.
CNN's Ed Payne contributed to this report