The parents of the girl called an ambulance believing that their daughter was suffering from a serious intestinal problem because of the intense pain she was suffering.
But on arrival at the emergency department of La Arrixaca hospital on Friday medics quickly realised that the girl was in the later stages of labour and was about to give birth.
Hospital sources said the baby arrived before there was time to transfer her to a delivery room, but that both mother and newborn were ‘doing well’.
Neither the girl, or her parents who are originally from Bolivia, claim to have been aware of the pregnancy, according to a report by Cadena Ser.
Hospital authorities alerted police and social services to investigate the circumstances of the pregnancy following the protocol for underage pregnancies and determine whether there is a case of child sex abuse.
Spain raised the age of consent from 13 to 16 in 2013 but an exception is made if sex is consensual when the boy is of similar age or stage of development and maturity.
The girl, whose identity has not been made public, is not the youngest mother recorded in Spain.
In October 2010, a ten-year-old gave birth in a hospital in Jerez.