Oscar Pistorius said he had no intention of killing his girlfriend and loved her deeply, according to an affidavit read out in court by his lawyer.
The South African athlete denied murdering Reeva Steenkamp and told a bail hearing he had no doubt the evidence would prove he was telling the truth.
In the statement, the Paralympic champion said he woke up in pitch darkness to a sound in the bathroom believing an intruder had climbed through the window. He described his sense of terror.
Pistorius, 26, did not realise Ms Steenkamp was not in bed and shot at the door on his stumps, feeling vulnerable without his prosthetics.
He said he then put on his prosthetic legs and used a cricket bat to break open the bathroom door where the 29-year-old was alive, slumped over in the toilet. He called the paramedics before she died in his arms.
"I'm absolutely mortified at the death of my beloved Reeva," the statement said.
Pistorius added that he had previously received death threats, so kept a 9mm pistol under his bed.
:: How The Hearing Unfolded In Court
However, prosecutors claim Pistorius got up from his bed, put on his prosthetic legs and walked seven metres before shooting Ms Steenkamp through a closed bathroom door.
The details showed it was a premeditated murder, Prosecutor Gerrie Nel said, adding there was "a motive to kill".
In an affidavit from close friends of the pair, Ms Steenkamp's best friend said the model told her she would marry Pistorius if he asked.
The magistrate had to stop the proceedings briefly as Pistorius sobbed uncontrollably as he listened.
Earlier, magistrate Desmond Nair ruled that, for the purpose of the bail hearing, the case was a schedule six offence or premeditated murder, which means it will be difficult for the sporting icon to get bail.
Outlining the prosecution case, Mr Nel said Ms Steenkamp fled to the small, cramped bathroom and locked herself in because she was scared after they couple had a row on Valentine's Day.
Ms Steenkamp was killed by three of the four shots fired by Pistorius at his home in South Africa last Thursday. Her family attended her funeral in Port Elizabeth this morning.
Mr Nel said the defence had a number of questions to answer, including:
:: Why did Pistorius carry Ms Steenkamp's body down a staircase after she was shot?
:: Why didn't Pistorius look for his girlfriend if he suspected there was a burglar in the house?
:: Why did Ms Steenkamp lock herself in the toilet - was she afraid of being shot or killed?
:: Why did he put on his prosthetic limbs and walk seven metres to the bathroom?
Mr Nel said: "If I arm myself, walk a distance and murder a person, that is premeditated. The door is closed. There is no doubt. I walk seven metres and I kill. The motive is 'I want to kill'. That's it."
Pistorius, who won two gold medals at the London 2012 Paralympic Games, broke down in tears at the start of the hearing.
Sky's Special Correspondent Alex Crawford, inside the court in Pretoria, said the double amputee's "face was creased in pain" and he was "weeping" as he was formally charged with murder.
The prosecutor said Pistorius, nicknamed the Blade Runner, "killed an innocent woman".
At the start of proceedings, Pistorius, in a grey suit and tie, nodded after the chief magistrate asked if he was well. And he nodded his appreciation when his brother, Carl, pressed his shoulder in support.
Journalists jammed into the courtroom, which was full with almost 100 people, including Pistorius' father, Henke, and sister Aimee.
The hearing has been adjourned until Wednesday.