MADRID -- The Spanish government on Thursday granted a temporary residence permit to an 8-year-old Ivory Coast boy that a woman tried to smuggle into Spain in a suitcase.

Adou Ouattara was discovered when police scanned the suitcase May 7 in Ceuta, a Spanish city enclave in North Africa. The Interior Ministry's office in the city said the boy's residence permit is for a year.

Police images of the scanned case shocked many and seemed to highlight the harrowing plight of migrants trying to reach Europe.

The boy's father, who lives legally with the mother in Spain, was arrested on charges of human rights abuse for trying to have the boy smuggled into the country.

His lawyer, Francesco Luca Caronna, says the man knew nothing of the plan, believing the son was to be brought in by car with a visa he paid for abroad.

The lawyer is confident the judge handling the case will accept the father's explanation and release him so that the family can be reunited.

The child is being cared for in a centre for the underage in Ceuta.

A Moroccan woman unrelated to the boy was carrying the suitcase. She was also detained.

Ouattara has been living legally on the Spanish Canary Island of Fuerteventura for seven years and working in a launderette. His Ivory Coast wife joined him later and the couple was trying to bring over two of their children.

His lawyer said an 11-year-old daughter was allowed in recently but Ouattara's monthly salary fell some "50 or 60 euros" short of the 1,331 euros ($1,480) authorities deemed he needed to care for two children. It was then that Ouattara thought he might be able to go about it by buying a visa.