The man that Copenhagen Police suspected was behind a series of rapes and attempted rapes in the capital was convicted on Wednesday.
The court found the 25 year old, who came to Denmark in 2008 as a UN quota refugee, guilty of three rapes and two attempted rapes.
The man will be held in open-ended preventive custody and could also face expulsion from Denmark and an entry ban.
He was sentenced to what is known as forvaring, a sentence with no concrete end date. Under the sentence, the convicted appears in court after a period of five years for a determination of continuation. After the initial five years, there will be an annual determination.
The jury also ruled that if the man is released from prison he should be expelled from Denmark and face an entry ban.
The man's lawyer filed an immediate appeal against the court's decision.
According to TV2, the man was born in Congo but raised in Zambia. He lives with his Zambian wife and their children in the northern Copenhagen suburb of Holte.
He is a trained home care professional and has also worked as an assistant for two handicapped boys.
In a series of attacks dating back to July 2014, the man targeted women who were out alone after partying in the Copenhagen nightlife. All five of his female victims told police that he attempted to force them into a dark vehicle and then sexually assault them.
The court was due to rule on the man's mental health before issuing a sentence.