
After landing at the El Prat airport, the woman was checked at a hospital and found she had not gone into labour, the government said.
Police detained 14 people who were on the plane operated by Turkey’s Pegasus Airlines, while 14 others were still missing, the government said.
It said five were put back on the plane and eight others will be deported to Morocco.
It did not give details about all the migrants.
The plane had a total of 228 passengers from Casablanca to Istanbul, where it landed at 1.10pm local time after a delay of over three hours, according to Flightradar.
Just over a year ago, a group of passengers from Casablanca to Istanbul fled their plane on to the runway in the Spanish island of Mallorca following an emergency landing under a false pretext and 12 of them were arrested, while 12 others escaped.
Illegal migration – normally by boat or via the land border between Morocco and the Spanish enclaves of Ceuta and Melilla on Africa’s northern coast – has been one of several points of contention in Spanish-Moroccan relations in the past decades.