Police in Spain's north African territory of Ceuta have found an eight-year-old boy crammed into a suitcase in an effort to smuggle him across the border.

The crouching shape of the child was spotted on an x-ray machine that scans luggage.

A 19-year-old woman carrying the case has reportedly been arrested.

The boy is from Ivory Coast and has been placed in the care of authorities in Ceuta.

"When they put the suitcase through the scanner, the operator noticed something strange, which seemed to be a person inside the case," an official told AFP.

Officials said the eight-year-old boy was found in a "terrible state" crammed in a suitcase. ( AFP/Spanish Guardia Civil )

"When it was opened they found a minor, in a terrible state."

The Civil Guard arrested the woman, who was due to go before a judge.

They also arrested the boy's father when he tried to cross the border a few hours later. The father is Ivorian and lives in Spain's Canary Islands.

Thousands of migrants each year risk their lives trying to enter Ceuta and another Spanish territory bordering Morocco, Melilla, in search of a better life in Europe.

Many Africans try to scramble over the seven-metre fences that separate the Spanish cities from Morocco.

Others smuggle themselves over the border hidden in vehicles and cargoes or try to swim or sail from shores on the Moroccan side.

Earlier this week a 23-year-old Moroccan was found in a shipping container in the port of Melilla.

He was dehydrated after four days cooped up without food or water, since the container was left unattended over the May holiday weekend.

ABC/AFP