THE HAGUE, Netherlands (AP) — A man who sent death threats to the Dutch king’s eldest daughter, Princess Amalia, was sentenced Tuesday to three months imprisonment and ordered to undergo psychiatric treatment.

The Overijssel District Court convicted the 32-year-old man of sending threats via Instagram to the 16-year-old heir to the Dutch throne and one of her friends.

“He threatened her with rape and threatened both of them with death,” said Ronald van Vuure, a judge at the court authorized to speak to the media.

“The court concluded that he developed a very unhealthy obsession with the Royal House and in particular Princess Amalia,” Van Vuure added in a statement posted on the court’s website.

The defendant was detained by military police outside the royal family’s former home in 2017 and said at the time that he had a date with Amalia, whose official title is Princess of Orange, the court said.

The man’s identity was not released, in line with Dutch privacy rules.