The man who tried to get into king Willem-Alexander’s home in Wassenaar on January 1 wanted to ask the king if he could marry his oldest daughter Amalia, he told a court on Thursday.

Together he and Amalia would have to save the world the man, who is 35 and comes from Lelystad, told the court.

The man was spotted by the fence surrounding Villa Eikenhorst with a can of beer in his hand, which he told police guarding the property he wanted to share with the king.

He was taken to court because he also threatened the police, local broadcaster Omroep West said. He told the police: ‘you have to search me because I could be wearing a bomb’. He also said he could have shot them.

Experts determined later the man is suffering from schizophrenia and delusions which are not properly controlled by the drugs he is taking. The man was jailed for a time but then released with an electronic surveillance anklet, which he cut off.

The public prosecution department says the man needs to be held in a secure psychiatric clinic for treatment.