According to Madsen's version of events, which was read to the court by prosecution lawyer Jacob Buch Jepsen, Wall died at around 10pm on August 10th after a hatch weighing 70 kilograms fell on to her.
Madsen has been charged with manslaughter and the prosecution has requested he undergo psychiatric evaluation.
Madsen denies his guilt, confirmed defence lawyer Betina Hald Engmark, but admits the charge of irregular conduct with a corpse due to having thrown Wall's body overboard, according to reports by TV2 and DR, who were present in court.
“It is necessary to go up on the bridge to steer the submarine. He [Madsen] lifted the hatch, and Kim was down inside the submarine, and they agreed that she should come up too. He suddenly slipped on the platform, and the hatch fell down and hit Kim,” read the statement read out at the hearing.
Madsen then went into shock and began acting irrationally after realizing that Wall had been killed, according to the account.
The amateur inventor told the court that he became suicidal following the accident and decided to sail out into the Öresund and take his own life, before changing his mind and burying her at sea.
He then decided to sink the submarine by opening its valves, according to the statement, which was read in court and then confirmed by Madsen.
After his statement had been read out to the court, Madsen responded to questions from both the prosecution and defence lawyers and witness testimonies were read out.
Examination at Copenhagen's Rigshospitalet following his arrest showed evidence of “fresh injuries” which Madsen said were due to his work on the vessel, the court heard.
The submarine owner also stated that he did not know Wall prior to August 10th.
According to Madsen, he heard the sound of Wall falling to the bottom of the submarine before finding her bleeding and unconscious, and realizing she had died.
He said that her shoes and tights had come off as he dragged her body up through the submarine's tower.
He had no explanation for why Wall's torso was found on August 21st with its arms, legs and head intentionally removed.
Details of the autopsy of Wall's torso were also presented to the court, but not allowed for press coverage due to their sensitive nature, both for the ongoing investigation and for those close to Wall, reports TV2.
READ ALSO: Who is Danish inventor Peter Madsen?
Freelance journalist Wall's torso was found floating in Køge Bay off Copenhagen on August 21st, ten days after she went missing while interviewing Madsen aboard his homemade submarine for a feature story.
After the 30-year-old failed to return home following her interview on August 10th, her boyfriend reported her as missing on August 11th.
That same day, Madsen was rescued from waters between Denmark and Sweden shortly before his submarine sank. Investigators recovered and searched the vessel, which police believe he sank intentionally.
Police said that Wall's legs, arms and head, which have not yet been found, were removed deliberately, and that the body had been tampered with to make it sink. Wall's blood was found inside the submarine.
Madsen is a self-taught engineer who, in addition to launching his homemade submarine, has also successfully launched rockets with the aim of developing private space travel. The 18-metre Nautilus was the biggest private submarine ever made when Madsen built it in 2008 with help from a group of volunteers.
Wall, from Trelleborg in southern Sweden, worked as a freelance journalist based in New York and China, and her articles were published in The Guardian, The New York Times and others.