ES News email The latest headlines in your inbox twice a day Monday - Friday plus breaking news updates Enter your email address Continue Please enter an email address Email address is invalid Fill out this field Email address is invalid You already have an account. Please log in Register with your social account or click here to log in I would like to receive lunchtime headlines Monday - Friday plus breaking news alerts, by email Update newsletter preferences

A Danish inventor whose submarine sank near Copenhagen has been arrested by police investigating the disappearance of a Swedish journalist who was last seen on board.

Peter Madsen was arrested on Friday on preliminary manslaughter charges over the disappearance of 30-year-old Kim Wall after his 40-tonne, 60ft-long submarine sank off Denmark's eastern coast.

Madsen has denied responsibility for the fate of Ms Wall, saying she had disembarked before his vessel went down.

But a Danish court ordered that he was detained for 24 days while police investigate her disappearance.

Judge Kari Soerensen announced the ruling after a two-hour custody hearing held behind closed doors.

Madsen's defence lawyer, Bettina Hald Engmark, said her client maintains he is innocent.

Ms Hald Engmark said Madsen is "willing to cooperate" and has not decided whether to appeal the detention ruling.

Before the hearing was closed, the courtroom was packed with Danish and Swedish reporters and the 46-year-old Madsen's relatives.

Prosecutor Louise Pedersen said Madsen faces the preliminary manslaughter charge "for having killed in an unknown way and in an unknown place Kim Isabell Frerika Wall, of Sweden, sometime after Thursday, 5pm."

Ms Wall's boyfriend alerted authorities early Friday that the sub had not returned to Copenhagen as expected, prompting a major search involving two helicopters, three ships and several private boats.

The Navy said the sub, the UC3 Nautilus, was seen sailing, but then sank shortly afterwards.

Kristian Isbak, who had responded to the Navy's call to help locate the ship on Friday, said he first spotted Madsen standing wearing his trademark military fatigues in the submarine's tower while it was still afloat.

"He then climbed down inside the submarine and there was then some kind of air flow coming up and the submarine started to sink," Mr Isbak said.

"(He) came up again and stayed in the tower until water came into it", before swimming to a nearby boat as the submarine sank.

Madsen told authorities he had dropped Wall off on an island in Copenhagen's harbour a few hours into their Thursday night trip.

"It is with great dismay that we received the news that Kim went missing during an assignment in Denmark," her family said.

The Sweden-born freelance journalist studied at the Sorbonne university in Paris, the London School of Economics and at Columbia University in New York, where she graduated with a master's degree in journalism in 2013.

She lived in New York and Peking, her family said, and had written for The New York Times, The Guardian, the South China Morning Post and Vice Magazine, among other publications.