Some 329 people, including newborn babies, had to be rescued after their wooden boat flooded on Sunday.
The Defense Ministry said a Spanish frigate was working on a European border patrol mission when it saw the troubled vessel.
With the help of Spanish NGO Proactive Open Arms, it transferred all of the passengers from the boat off the coast of Libya.
The group included 95 women, three of them pregnant and 17 children, some of which were newborns.
They have all been taken to an Italian port.
The International Organization for Migration estimates that 4,742 migrants entered Europe by sea in the first 25 days of this year, with 206 dying en route.
The migrants were transferred to Italy yesterday.