Astonished Spanish police on Thursday discovered a young boy being smuggled across the border from North Africa inside a suitcase.

Police put the luggage bag through an X-ray scanner and found the silhouette of an 8-year-old boy from the Ivory Coast curled up inside.

“At first we thought that there could be drug packages, but gradually discovered that it was a human body.”

- Police spokesman

They apparently found the boy, Abou, just in the nick of time.

He appeared to police to be in a “terrible state,” a spokesman for the Guardia Civil told AFP, according to the BBC.

The boy is now in the custody of authorities in Cueta, a Spanish territory that shares a border with Morocco. His father was being held on human rights abuse charges.

A police statement said guards stopped a 19-year-old Moroccan woman who looked nervous. She was waiting in line with the suitcase on her way from Morocco to Cueta.

After the boy's discovery, border officers detained the woman and, later, the child's father, also named Abou, at the same border crossing. The Associated Press said the woman is married to the father, and both had residence rights in Spain. The boy did not.

The woman is not the boy’s mother.

The BBC quoted El Pais as saying that the boy’s father lives in the Canary Islands and had hoped to be reunited with his son.

Spanish media was reporting that the woman was a courier paid by the father to smuggle the boy across the border.

“She seemed to hesitate, and it looked as though she didn’t want to come through the border,” the BBC said a police spokesman told Efe. “At first we thought that there could be drug packages, but gradually discovered that it was a human body.”

The Washington Post said officials told Efe if the boy not been spotted, “it could have led to a tragic end.”

The Associated Press contributed to this report.