Danish inventor Peter Madsen gave his account in a Copenhagen court Tuesday of how journalist Kim Wall died on board his home-made submarine earlier this month. Madsen, 46, alleged that Wall died in an accident when the submarine's 15-pound hatch fell on her, according to Swedish tabloid Aftonbladet.

The pair had climbed up onto the submarine’s watchtower when Madsen slipped, causing the hatch to slam shut, the inventor said. Wall, 30, was coming up behind him and the hatch hit her over the head. When he looked down, he told the court, she was “bleeding violently” from her head. He tried to administer first aid, he claimed, but she was already dead, the Daily Mail reported.

“If I hadn’t slipped, then the hatch would not have fallen,” said Madsen, according to Aftonbladet. “We would have had Kim alive and I would not have been sat here today.”

Madsen said after he realized Wall was dead, he continued out to the Baltic Sea, where he slept with Wall’s body on board the craft. When he decided to dump her body in the ocean, he said, her “shoe and tights fell off” while he carried her to the top of the submarine. He admitted in court Tuesday to “indecent handling of a corpse,” according to the Daily Mail.

Wall’s torso was found more than a week after she went missing August 10. Her head and limbs had been deliberately cut off and her body was weighed down with metal to make it sink, police said. Investigators had not yet released Wall’s exact cause of death but said they found blood belonging to Wall inside Madsen’s submarine.

Madsen, who was charged with manslaughter, initially told investigators he deposited Wall safely back on land before changing his story to say she died in an accident and he buried her at sea. Madsen’s submarine sank shortly after Wall was reported missing. The inventor said there was a technical malfunction with the ballast tanks, but police maintained he sunk it deliberately. Danish police said they were searching the submarine for any possible secret chambers as they continued to hunt for the rest of Wall’s remains.

Madsen’s pleaded not guilty to manslaughter charges and his lawyer maintained an accident occurred on board the ship even after Wall’s mutilated corpse was discovered.

“It doesn’t change my client’s explanation that an accident happened,” Betina Hald Engmark reportedly told the Danish tabloid BT after Wall’s remains were found. “No matter what, we find it very positive that she has been found now.”

GettyImages-831014362
A photo allegedly shows Peter Madsen and Kim Wall on board his submarine in Copenhagen Harbor, Aug. 10, 2017. Getty Images