A Moroccan pensioner who was driving the car was arrested for trying to smuggle in the youth, who was curled up inside the tiny space behind the dashboard.
Border guards discovered the boy, who is believed to be from Guinea, after detecting his heartbeat using a special machine designed to screen vehicles for stowaways.
When the child was freed from his cramped hiding space he was reportedly disorientated and suffering breathing difficulties. He also told medics at the border that he felt numbness in his limbs because of the position he was forced to adopt to fit into the space behind the dashboard of the BMW X5.
'A tiny detail aroused the suspicion of officers when a heart beat sensor was passed over the car, a high-end vehicle in very good condition," said a statement released by the Guardia Civil.
'The boy was found during an exhaustive search inside the dashboard. An officer felt the body of a person after introducing his hand and immediately ripped off part of it to remove and assist the human being who turned out to be a young boy.'