PRETORIA, Prosecutors unveiled what seemed to be damning testimony Wednesday against Olympic athlete Oscar Pistorius, accused of murdering his girlfriend. But as the day wore on, the defense attorney savaged the state’s case, portraying the investigation as bumbling and shoddy.

Laying out what probably will be the basis of their future case, prosecutors told Pistorius’ bail hearing that a witness heard noises sounding like a quarrel shortly before model Reeva Steenkamp was fatally shot the night of Feb. 13. Another neighbor heard a shot, a woman scream, then more gunshots, they said.

The police investigator on the case, Hilton Botha, said Pistorius didn’t phone an ambulance after the shooting. The athlete had a history of threatening people, he told the court, adding that boxes of what the officer first identified as steroids but later called testosterone were found in Pistorius’ home.

“I believe that he knew that Reeva was in the bathroom and he shot four shots through the door and killed her,” Botha said.

But after defense attorney Barry Roux succeeded in raising questions about the evidence, Pistorius’ hopes of getting bail appeared to have improved. He said he shot Steenkamp by mistake, convinced that she was a burglar.

Under cross examination, Botha admitted that he found nothing at the scene inconsistent with Pistorius’ account that he mistook Steenkamp for a burglar. He also said the victim had no defensive wounds, nor were there any signs of a struggle or an assault.

Botha acknowledged that the woman who heard what sounded like quarreling at Pistorius’ house lived 600 yards away. Botha later modified that to 300 yards, muttering that he would like to measure the distance.