Felipe Juan Froilán, the eldest grandson of Spain's King Juan Carlos I and Queen Sofía, was released Monday from the Madrid hospital, where he was treated for the self-inflicted gunshot wound in the right foot that he sustained last week.

The 13-year-old boy left the hospital with his mother, Princess Elena, who is the eldest daughter of King Juan Carlos and Queen Sofía.

The boy was practicing firing a small-caliber shotgun last Monday in the yard of the house belonging to his father, Jaime de Marichalar, the ex-husband of Princess Elena, when the accident happened.

Felipe Juan Froilán, Princess Elena's oldest child, shot himself at Marichalar's house in the central province of Soria.

The boy, who was with his father when he fired the double-barreled shotgun, received first aid at Santa Barbara Hospital in Soria and was later taken to the Quiron clinic, located on the outskirts of Madrid, where doctors operated on his foot.

Surgeons removed some of the buckshot that entered the front part of the boy's foot between his toes.

The king's grandson was released after completing the seven days of antibiotic therapy prescribed for the type of wound he sustained.

Felipe Juan Froilán "will continue to receive care and undergo rehabilitation at home," the Royal Palace said in a statement, citing doctors.

The boy, however, will have to return to the hospital as needed to be examined by doctors, Royal Palace officials said.

The Civil Guard is investigating the shooting because those under the age of 14 are not allowed to have firearms under Spanish law.

Felipe Juan Froilán, who is fifth in the line of succession to the Spanish Crown, will not turn 14 until July 17.

Jaime de Marichalar could face a fine for allowing his son to use a firearm without a license.

Follow us on twitter.com/foxnewslatino
Like us at facebook.com/foxnewslatino