Ari Behn published his first book in 1999.

Norwegian author Ari Behn, who was previously married to the country's Princess Maertha Louise, died on Wednesday aged 47, his manager told AFP, saying he had committed suicide.

"It is with great sadness in our hearts that I on behalf of the very closest relatives of Ari Behn must announce that he took his own life today," Behn's manager Geir Hakonsund said in an email to AFP.

Behn published his first book in 1999, a collection of short stories whose English translation is "Sad as hell".

He rose to public prominence in 2002 after marrying the Norwegian royal Maertha Louise, and they wrote a book about their wedding with the title "From heart to heart".

The couple had three daughters together before announcing their divorce in August 2016.

Friends and public figures expressed their condolences on Wednesday, including Norwegian Prime Minister Erna Solberg and the royal family.

"Ari was an important part of our family for many years, and we carry warm and good memories of him with us," the Royal House of Norway said in a statement.

Behn also wrote several novels and plays, and in 2018 published his last book, "Inferno," in which he detailed his struggle with mental health issues.