A husband and wife from Malaga were sentenced on Thursday for their 2011 attempt to buy an unborn child, Andalusian online newspaper Sur reported.
A Spanish woman from Ceuta acted as intermediary between the couple and a pregnant Moroccan woman who agreed to hand over her baby when it was born in return for €3,000.
The scheme was accidentally discovered by a policeman training in the city of Ceuta who reported it to his colleagues.
Ceuta's criminal court sentenced the husband to a year's imprisonment as well as a fine of €3,240 and a four-year loss of custody and guardianship rights.
His partner received a six-month suspended sentence.
The biological mother was fined €135 while the intermediary and her mother received six month suspended sentences. All defendants pleaded guilty to the charges.
The baby, now two years old, is in the care of Ceuta social services.
This is not the first time this week that Spain has been rocked by the sale of Moroccan babies to Spanish families.
Police yesterday revealed 28 cases from the 1970s and 1980s where newborns were taken from their mothers in Morocco and the Spanish North African enclave of Melilla and sold to families in mainland Spain.
The investigation was opened in November 2011 following a complaint from ANADIR, an association formed to represent victims of the scandal.