His voice shaking, Oscar Pistorius took the witness stand for the first time, testifying that he was trying to protect the girlfriend he killed and that he became so tormented by memories of the fatal shooting and panic attacks that he once hid helplessly in a closet.

Pistorius on Monday (local time) also offered an apology to the family of Reeva Steenkamp, who died from multiple wounds after the double-amputee runner shot her through a closed toilet door last year in his home. He said he mistook Steenkamp for an intruder. Prosecutors allege he killed her after an argument.

"There hasn't been a moment since this tragedy happened that I haven't thought about your family," the athlete said at the murder trial as Steenkamp's mother, June, looked impassively at him in the courtroom.

"I was simply trying to protect Reeva. I can promise that when she went to bed that night she felt loved," Pistorius said.

Pistorius' display of anguish and remorse was a marked departure from the testimony of some prosecution witnesses whose accounts painted a picture of the runner as a hothead with a jealous streak, an inflated sense of entitlement and an obsession with guns in the months before he killed Steenkamp, a 29-year-old model.

He has yet to be cross-examined about the shooting in the early hours of February 14, 2013, and that testimony is likely to be the centrepiece of a trial being broadcast on television and followed around the world. Pistorius was charged with premeditated murder and faces 25 years to life in prison if convicted. Some analysts think the judge, who will decide the case, will consider a lesser charge such as homicide, which could still send him to prison for years.

Pistorius, 27, spoke in a soft, quavering voice at the start of his testimony, forcing Judge Thokozile Masipa to ask him to speak more loudly. He stood at first, stifling sobs as he said he was on antidepressant medication and sometimes woke from nightmares to the "smell of blood".

Defence lawyer Barry Roux, who had aggressively challenged prosecution witnesses since the trial began March 3, led Pistorius gently through events in a life that was held up, in the runner's heyday, as an inspiring tale. Pistorius was born without fibula bones because of a congenital defect, and his legs were amputated when he was 11 months old. He ran on carbon-fibre blades and is a multiple Paralympic medallist. He also competed at the London Olympics but didn't win a medal.

Pistorius described the positive role of his mother, Sheila, and his grief when she died when Pistorius was a teenager. He spoke about the sacrifices he had made for his athletic achievements, his work with charity and how religion was important to him.

Pistorius said he has been taking antidepressant medication since the week after he killed Steenkamp and has trouble sleeping. He described one night when he went to hide in a closet after waking up in "a panic".

"I climbed into a cupboard and I phoned my sister to come and sit by me, which she did for a while," Pistorius said.

His voice broke again, and he struggled to speak when he described how Steenkamp was "a blessing" in his life. Yet in cellphone messages revealed by the prosecution, Steenkamp had once said that Pistorius scared her.

Pistorius will return on Tuesday to continue testifying after the judge granted an early adjournment because she said Pistorius looked "exhausted". Pistorius said he had not slept the night before.

"I'm just very tired at the moment .... I think it's a lot of things going through my mind," he said. "The weight of this is extremely overbearing."

Pistorius also described how he felt vulnerable to crime, an attempt to explain his claim that he reacted to what he thought was a dangerous intruder in his bathroom by shooting with his 9 mm pistol. He said his mother slept with a gun under a pillow, and that his family had been hit by house break-ins and carjackings over the years. He said he had sometimes been followed by unidentified people while driving home.

Pistorius also referred to an incident in which he was allegedly assaulted at a social function in late 2012 and had to have stitches on the back of his head.

Prosecutors have provided a contrasting picture with evidence indicating that he had been reckless with firearms in public, allegedly shooting his gun out of a sunroof on a road and asking a friend to take the blame for him when a gun was fired under a table in a busy restaurant weeks before he killed Steenkamp.