A former girlfriend of Oscar Pistorius has told his murder trial that their relationship ended when he cheated on her with Reeva Steenkamp, the woman he shot dead last year.
Samantha Taylor also said today that Pistorius carried a gun with him "all the time" when they were dating, and on one occasion he fired it out of a car's sunroof soon after a policeman stopped the car they were in for speeding.
Defence lawyer Barry Roux said he would produce emails between Ms Taylor and Pistorius to show the cheating allegation was untrue.
On the sunroof shooting allegations, the athlete was irritated when the policeman handled his gun after reprimanding him for leaving the weapon on the car seat, Taylor alleged.
"After he fired the shot, he laughed about it," she added.
Pistorious was a passenger in the car and Mr Roux said he denies he fired through the sunroof.
Double-amputee Pistorius, 27, has plead not guilt to planning to shoot Ms Steenkamp at his Pretoria home on February 14, 2013. Known as the Blade Runner because of his prosthetic running blades, he admitted to shooting Ms Steenkamp three times while she was in his bathroom, believing she was an intruder.
Today's gun testimony relates to a separate charge of illegally discharging a firearm in public.
Taylor told the court she couldn't remember where the incident took place,y.
Presiding Judge Thokozile Matilda Masipa briefly adjourned proceedings after Taylor broke down on the stand when she testified that the relationship ended because Pistorius cheated on her with Ms Steenkamp.
Earlier, the court heard how one of the first people on the scene after Pistorius shot Ms Steenkamp told a court that he feared the Olympic and Paralympic star might kill himself with the same gun.
Testifying on the fourth day of the trial in Pretoria, neighbour Dr Johan Stipp said he entered the athlete's home minutes after hearing screams and shots to find the South African sprinter kneeling over the lifeless body of a woman.
"I shot her. I thought she was a burglar and I shot her," Dr Stipp quoted Pistorius as saying.
Dr Stipp described his futile attempts to revive Ms Steenkamp, a 29-year-old model and law graduate.
As he checked for signs of life, Pistorius was begging him to save her.
"Oscar was crying all the time. He prayed to God, 'Please let her live, she must not die'," Dr Stipp told the court.
At one point when Pistorius left Ms Steenkamp, Dr Stipp and housing complex manager Johan Stander to go upstairs, the doctor thought the athlete might be about to kill himself.
"I noticed that Oscar was going upstairs and I asked Mr Stander if he knew where the gun was because it was obvious that Oscar was emotionally very, very upset," he said.
"I didn't know the situation in the house, so I thought maybe he was going to hurt himself."
Describing what he saw at Pistorius's villa, Dr Stipp told the court: "It was obvious that she was mortally wounded. At the bottom of the stairs there was a lady lying on her back."
"I tried to assist her," he said. "I tried to open an airway. She had no pulse in the neck, she had no peripheral pulse. She had no breathing movements."
Sitting on a courtroom bench, Pistorius bent forward and put his hands over his face, then moved them to cover both ears, as Dr Stipp spoke.