The king of Spain's 13-year-old grandson has accidentally shot himself in the foot with a shotgun, palace officials said.

A spokesperson said the boy, Felipe Juan Froilan, was handling a small-calibre weapon at a country estate owned by his father when the gun went off, injuring his right foot.

Widely known in Spanish media as simply Froilan, the boy is the son of Princess Elena, the eldest of King Juan Carlos and Queen Sofia's three children, and an aristocrat and banker named Jaime de Marichalar. The couple were divorced in 2009.

The boy is being treated in a Madrid hospital. He is the eldest of eight royal grandchildren.

Under Spanish law, it is illegal for children under 14 to possess or discharge firearms. A palace official declined to comment on the matter.

It is now up to a judge to decide whether to punish the boy's father. Spain's Civil Guard police said he could face a fine of up to 6,000 euro.

The royal palace said the boy underwent surgery on a toe overnight and will be in hospital for a few days.

It is not the first shooting incident in the royal family's history.

In 1956, Juan Carlos was handling a gun that accidentally went off and killed his 14-year-old brother. The accident happened in Estoril, Portugal.

Sign up to our free newsletters

Get the best updates straight to your inbox:
Please select at least one mailing list.

You can unsubscribe at any time by clicking the link in the footer of our emails. We use Mailchimp as our marketing platform. By subscribing, you acknowledge that your information will be transferred to Mailchimp for processing.