Officials in the Spanish territory of Ceuta, in North Africa, made a startling discovery when they scanned the pink roller bag: A human silhouette.

When they opened the bag, police found a small boy curled up inside.

A woman was attempting to smuggle the 8-year-old Ivory Coast boy across the border with Morocco and had looked nervous while waiting in line at the land crossing. So authorities stopped the 19-year-old woman and scanned the bag, the Associated Press reported.

“When they put the suitcase through the scanner, the operator noticed something strange, which seemed to be a person inside the case,” a Spanish Civil Guard police spokesman told AFP. “When it was opened they found a minor, in a terrible state.”

Had the boy not been spotted, “it could have led to a tragic end,” according to a Civil Guard statement to Spanish news agency Efe.

The boy remains with authorities in Ceuta, BBC reported.

Authorities detained the Moroccan woman; they also detained the boy’s father when he attempted to cross the border hours later. The two are married to one another, and a court ordered that the father be held on human rights abuse charges, the AP reported.

The father, also from the Ivory Coast, holds a residence permit for the Canary Islands and wanted to be reunited with his son. He told Spanish paper El Pais that he “didn’t know that this was the way” his son would travel across the border. The father’s family reunification application had been previously denied, El Pais reported.

Ceuta and Melilla, another Spanish enclave on Morocco’s border, have experienced waves of African migrants attempting to enter European territory. More than 4,300 people tried to enter the two enclaves in 2013, up from 2,804 the year before, according to Human Rights Watch.

Attempting to cross the borders can be risky, even deadly, and Spanish authorities have faced criticism for how they treat such migrants. In February 2014, 15 migrants drowned while attempting to swim to Ceuta. El Pais reports that Spanish authorities later admitted to firing rubber bullets in the direction of the swimmers.

Large groups also regularly try to scale the 20-foot-high fence between the territories and Morocco. About 500 made the climb into Melilla in 2014, according to Human Rights Watch.