A German court on Friday sentenced a man to a psychiatric hospital after he was found guilty of causing serious bodily harm by spreading corrosive drain cleaner at a children's playground and two public barbecue sites.

The attack last summer left five young children with partial burns.

The 53-year-old defendant told the regional court in Aachen that he felt harassed by his neighbors and the children living on his road, claiming that he couldn't stop hearing their voices in his head. He admitted that he wanted to scare people away but added that he had not intended to injure anybody.

A doctor found during the trial that the man was suffering from paranoid schizophrenia. Judge Roland Klösgen said the defendant was "extremely dangerous" as the read out the verdict.

He had acted on the delusion that he was somehow "existentially threatened" by the children, the judge added.

The prosecution had initially charged the defendant with five counts of attempted murder. The charges were thrown out by the judge given the defendant was mentally ill.

The 53-year-old was apprehended in September, three months after the first recorded attack. He was caught by an infrared camera spreading drain cleaner granules in Aachen's Westpark.