Testifying on the fourth day of Pistorius' trial, neighbour Johan Stipp said he entered the athlete's home last year a few minutes after hearing screams and shots to find the distraught sprinter kneeling over the lifeless body of a woman.
Dr Stipp quoted Pistorius as saying: "I shot her. I thought she was a burglar and I shot her."
Dr Stipp went on to describe his futile attempts to revive Ms Steenkamp, a 29-year-old model and law graduate, who been dating Pistorius for a few months.
She died after being hit by three rounds, including one to the head, out of four fired by Pistorius through the locked door of an upstairs toilet. He denies murder, arguing it was a tragic mistake after he mistook her for an intruder.
As Dr Stipp checked Ms Steenkamp for signs of life, Pistorius was begging him to save her life, the court heard.
The witness said: "Oscar was crying all the time. He prayed to God: 'Please let her live, she must not die'.
At one point, when Pistorius left Ms Steenkamp, Dr Stipp and housing complex manager Johan Stander to go upstairs, Dr Stipp thought he might be about to kill himself.
He said: "I noticed 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.
"I thought maybe he was going to hurt himself."
Earlier, Pistorius' lead defence lawyer grilled another of the neighbours of the star athlete, questioning the man over how many gunshots he thought he heard on the night of Ms Steenkamp's death.
Lawyer Barry Roux said Charl Johnson's testimony and statements to police were manipulated to match those of his wife, who testified on the opening day of the trial on Monday, and were an attempt to "incriminate the accused".
"I can confidently say I heard gunshots," Mr Johnson insisted on cross-examination by Mr Roux on the fourth day of Pistorius' murder trial.
Mr Johnson added: "I'm convinced I heard a lady's voice."
Mr Roux has argued that prosecution witnesses Mr Johnson and his wife were mistaken over what they heard on the night Pistorius killed his girlfriend.
The lawyer said the banging sounds were actually Pistorius hitting a toilet door with a bat and the screaming was the distressed athlete calling for help - and there were no sounds from Ms Steenkamp.
Mr Johnson said he "disputed" some of what Mr Roux was saying and described in more detail what he heard that night. The Johnsons live 177 metres from the villa where Ms Steenkamp died.
Mr Johnson said: "The fear in the lady person's calls contrasted with a very monotone male voice. The man almost sounded embarrassed to be calling for help."
Mr Roux did get Mr Johnson to concede right at the end of the court session he never heard what he thought was the woman's voice and the man's voice at the same time. Mr Roux wanted to show it was the same person - Pistorius - screaming.
The trial continues.