RABAT, Morocco — A passenger on a Royal Air Maroc flight from Casablanca, Morocco, to Bologna, Italy, gave birth to a boy mid-air.

The official Moroccan news agency MAP says that the 39-year-old woman went into labor shortly after takeoff on Sunday. The flight was diverted to Barcelona, and the baby was born just before landing. The airline didn't specify the passenger's nationality. It said crew members and a midwife, who happened to be on the plane, helped with the delivery.

Mother and child were taken to Sant Joan de Deu hospital in Barcelona and are in good health, the airline says. The flight continued on to Bologna around 50 minutes after landing in Barcelona.