Upon medical advice, the baby and its mother were taken via helicopter to hospital on Lanzarote. No other complications have been reported by authorities.
“It being Three Kings Day, this was the best gift we could have received,” the commander of the helicopter, Álvaro Serrano Pérez, told Reuters news agency.
The ocean crossing from Africa to the Canary Islands is notoriously dangerous.
More than 46,800 undocumented migrants made the route last year to reach the islands, Spanish government data this month showed.
The Christian feast day of Epiphany, when observers celebrate the visit to Jesus by the Magi – commonly known as the Three Kings, or Wise Men – is widely celebrated in Spain.
Children polish their shoes on the eve of the event known as “El Dia de los Reyes” (the Day of the Kings) and leave them ready for the Three Kings – Melchior, Caspar and Balthazar – to put their presents in.