MADRID -- An Ivory Coast man jailed for allegedly trying to have his 8-year-old son smuggled into Europe in a suitcase says the man knew nothing of the plan, believing the child would be brought to Spain by car with a legal visa, his lawyer said Wednesday.

Ali Ouattara was jailed May 7 when border guards in Ceuta, a Spanish city enclave in North Africa, scanned a case being carried by a Moroccan woman and found his son curled up inside. The images shocked many and seemed to highlight the harrowing plight of migrants trying to reach Europe.

Lawyer Francesco Luca Caronna said Ouattara had paid an unidentified group 5,000 euros ($5.600) for what he thought was a legal visa and was unaware the child was to be put in a case.

Luca Caronna said Ouattara explained his case to a Ceuta judge on Monday and they are confident he will be released soon.

Court authorities in Ceuta were not available for comment on the case.

Luca Caronna said 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.

The 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 authorities deemed he needed to cater for two children. It was then that Ouattara thought he might be able to go about it by buying a visa.

"He thought the child was going to be brought in legally. At no point did he think the child was going to be put in a suitcase," said Luca Caronna.

The lawyer said the child was being well cared for in a centre for the underage in Ceuta and had been visited by the mother this week. He said they were hopeful that the family would be reunited soon.

The Moroccan woman who was carrying the case was also detained. Court officials said the woman was not related to the father.