A Danish judge has extended the detention of Peter Madsen, the inventor suspected in the death of a Swedish woman aboard his home-made submarine.

In the first public hearing since Madsen was arrested on Aug. 11, the 46-year-old claimed freelance journalist Kim Wall died after she was accidentally hit by a hatch in the submarine's tower, and denied all accusations of sexual assault.

Madsen is being held on preliminary charges of manslaughter and indecent handling of a corpse.

He told the court he slipped when in the tower and tried to hold the hatch, but it fell down. The journalist, who was on her way up the tower, was hit in the head by the 70-kilogram (155-pound) hatch and bled from an open skull fracture, he said.

He explained the accident horrified him and that he hauled her up using a rope, which resulted in her clothes being pulled off. He then dropped her body into the sea and intended to commit suicide.

Wall, 30, disappeared during an outing on Madsen's submarine on Aug. 10. Her naked torso was found off the Danish shore more than 10 days later. Police say her head, arms and legs had been deliberately cut off and have not been found.

Tuesday's hearing was not aimed at determining Madsen's guilt, but rather whether there was sufficient evidence to maintain his detention as police investigate. Madsen appeared calm in court, though irritated by the prosecution, which says the suspect is changing his explanation of the event as more information comes to light.