COPENHAGEN, Denmark (AP) -- The Danish government wants to ban prisoners serving a life sentence from entering a romantic relationship and says that they "should not have the opportunity to spend time in prisons dating or advertising their crimes on, for example, social media."

The move reportedly comes after Danish killer Peter Madsen engaged in a relation with a 17-year-old. In 2018, Madsen was sentenced to life in prison for killing Kim Wall, a 30-year-old reporter from Sweden whom he lured aboard his homemade submarine with the promise of an interview. He dismembered her body and dumped it at sea.

"In recent years, we have seen distasteful examples of inmates who have committed bestial crimes being contacted by very young people to gain their sympathy and attention. Of course, we have to stop that," Justice Minister Nick Haekkerup said this week.

Currently, inmates serving a long sentence can be in contact by telephone, letter and visits with people outside, allowing them to engage in a relationship while serving their sentences.

The government will propose a six-point plan next week that will "fundamentally restrict the opportunity for people serving a life sentence and certain detainees to make contact with the outside world," Haekkerup said. If adopted in the 179-seat Folketing, or Parliament, this autumn, the ban on relationships will apply during the first 10 years of a prisoner's sentence.

It would come into force on Jan. 1, 2022, and the center-right opposition has already said it is backing the proposal.

Madsen has denied murdering Wall. He claims she died accidentally inside the submarine, but he has confessed to throwing her body parts into the Baltic Sea. Madsen lost his appeal, shortly after apologizing to the victim's family who were present in the appeals court. The sensational case has gripped Scandinavia..

Life sentences in Denmark usually mean 16 years in prison, but convicts are reassessed to determine whether they would pose a danger to society if released and can be kept longer.