Peter Madsen, the Danish submarine inventor at the center of the mysterious death of Swedish freelance journalist Kim Wall, was convicted and sentenced to life in prison Wednesday for killing and dismembering Wall in a macabre case that has drawn international attention.

Wall's dismembered body was found off the coast of Copenhagen in August. Prosecutors had said that during a trip on his private submarine, Madsen, 47, bound and sexually assaulted Wall, and either strangled or cut Wall's throat before severing her body and tossing it into the sea.

Madsen was charged with homicide, dismemberment and the indecent handling of a corpse.

Madsen denied killing Wall, but has given differing explanations of how she died, including that she suffered fatal carbon monoxide poisoning inside the craft while he was on deck.

During the trial in Copenhagen, Madsen confessed that he had cut up Wall's body, saying it was so he could more easily remove her from the submarine and bury her at sea, the AP reported.

“What do you do when you have a large problem? You make it smaller,” Madsen told the court. “I am really, really sorry about what happened.”

In reading the verdict, Judge Anette Burkoe said Madsen's explanation that Wall had died in an accident was “not credible” and that Madsen had committed murder in a “serious and brutal manner to a randomly chosen woman, who had accepted his offer to go on a trip in the submarine,” according to Sky News.

A three-member panel comprised of Burkoe and two jurors unanimously found Madsen guilty of premeditated murder and sexual assault, the network reported.

CBS News reported that Madsen “stood quietly listening as the judge read out the verdict” in Copenhagen City Court. An attorney for Madsen said he plans to appeal.

“This is a very unusual and extremely brutal case which has had tragic consequences for Kim Wall and her relatives,” prosecutor Jakob Buch-Jepsen said in a statement from the Danish prosecution authority when Madsen was charged in January. Denmark does not have the death penalty.

Earlier this week, Buch-Jepsen called the case “so heinous and repulsive that as a prosecutor, it renders you speechless.”

“Of course I'm personally affected by this case,” Buch-Jepsen told the New York Times. “This case has crept under my skin more than other cases.”

Wall's disappearance and gruesome death drew outrage from around the world. Friends and family say Wall, 30, had reported from Sri Lanka, the Marshall Islands and North Korea.

Wall boarded the submarine on Aug. 10 to report a story about Madsen, according to her family. Madsen is known in Denmark for raising money through crowdfunding to build rockets and submarines.

She was reported missing the next day. Madsen was rescued from Koge Bay, according to police, after purposely sinking his vessel, a 60-foot UC3 Nautilus.

Prosecutors were seeking a sentence of life in prison for Madsen or, based on the results of a psychiatric evaluation, that he be sent to a mental institution. Prosecutors said the killing was premeditated, but they did not provide a motive.

“The interest in the case has been enormous,” Buch-Jepsen said in his January statement. “However, we hope the media will respect that further evidence in the case must be presented in court and not in the press.”

Madsen was taken into custody Aug. 12 and has since repeatedly altered his account of the circumstances that led to Wall's death. Before claiming in October that she died of carbon monoxide poisoning, Madsen in August said he dropped Wall offshore in Copenhagen before his submarine sank. He then told a Danish court in September that while giving Wall a tour of his boat, he lost his grip on a 150-pound hatch, which collided with Wall's skull. He told prosecutors at the time he panicked and gave Wall a “burial at sea.”

“In the shock I was in, it was the right thing to do,” Madsen told the court, according to Agence France-Presse.

In early October, divers found Wall's dismembered remains. Wall's legs were found in plastic bags weighed with metal, according to the Associated Press, and her recovered head showed no signs of fracture — which suggested she had not been struck by a hatch. Another bag contained a knife and Wall's clothing. Weeks earlier, a naked torso that had been stabbed 15 times was recovered nearby.

A specific cause of death could not be determined from an autopsy of Wall's remains, the AP reported.