Spanish King Juan Carlos' 13-year-old grandson accidentally shot himself in the foot while practising with his father, the palace said Tuesday.

The boy, Felipe Marichalar Borbon, shot himself while learning to use a shotgun on the family's estate in Soria, north-central Spain, on Monday, the royal household said in a statement.

"While on the patio of the house with his father, he shot himself with a small .36 calibre shotgun, causing an injury in the right foot," the household said.

Doctors at Soria Santa Barbara hospital performed first aid on the boy, who is the oldest of the king's grandchildren and the son of Jaime de Marichalar, who reportedly divorced in 2009 from Princess Elena, it said.

He was then transferred to a Madrid hospital where the wound was surgically cleaned.

Queen Sofia visited the child Tuesday morning.

The boy's injuries were not considered serious, according to the Spanish press.

Fifth in line to the throne after his mother Elena, the teenager had been spending a few days on thefamily estate with his father Jaime de Marichalar and his 11-year-old sister Victoria Federica.

After spending a year in Britain from 2010-2011 to improve his English, Felipe Marichalar Bornonreturned to Spain and now lives in Madrid with his mother.

The 74-year-old Spanish king's family past was marked by a fatal shooting during Easter week on March 29, 1956.

Juan Carlos was present when his younger brother Alfonso was shot dead in an accident involving a revolver at the family residence in Estoril, Portugal. The brothers were reportedly playing with the gun at the time.