Thank God for toys.

The King of Thailand, King Maha Vajiralongkorn would have been a dead man by now.

A 14-year-old German boy - who may have been taking gun practice - is being investigated after he was suspected to have shot plastic bullets from a toy gun at the King of Thailand who was cycling near Munich this month.

The king was not hurt.

The unidentified youth, together with a 13-year-old who is too young to be investigated, is suspected of having fired the gun from a garden or house window at a group of cyclists that included King Maha Vajiralongkorn, a regular visitor to Germany along with his entourage.

"A toy pistol, a soft air pistol, was used. First it was fired at a group of cyclists, one of whom was the King of Thailand," said Thomas Rauscher, prosecutor in the southern town of Landshut. Neither the king nor any of his entourage was hurt.

The palace in Bangkok, when contacted by Reuters on Thursday, said it did not know about the incident.

"We have no details," said an official at the palace's news division who declined to be named because of the sensitivity of the matter in Thailand.

Prosecutors said the king's household said they had no interest in charges being brought in the case.

Reuters was unable to contact the youth, who has not been identified, or representatives for him.

It was not clear who had drawn the incident to the attention of the police.

Representatives at the Thai Embassy in Berlin were not available for comment.