A boat carrying over 40 migrants has capsized off the Libyan coast while a cargo ship was trying to save them, Italy's coast guard confirmed on Sunday.

"During the rescue operations by the motor vessel... the boat capsized during the transfer of the migrants: 17 people were rescued and recovered by the vessel while approximately 30 migrants were missing," the coastguard said in a statement.

According to AFP, Alarm Phone, a hotline used by migrants in distress, had alerted Rome's rescue coordination centre to the presence of the boat on Saturday, also notifying Maltese and Libyan authorities.

The group first said on Sunday that migrants had drowned, adding that it had signaled a boat encountering difficulties off the northwest of Benghazi and informed the Italian authorities early on Saturday.

Meanwhile, the German NGO Sea-Watch said on Saturday that its reconnaissance plane had spotted the "dangerously loaded migrant boat" sailing upon rough seas.

Rome's rescue coordination center sent three nearby merchant vessels towards the migrants' boat after receiving an assistance request from Libya's Coast Guard.

APF said the vessel reported problems performing a rescue due to bad weather.

Two weeks ago, 76 migrants were killed when their boat sank off the coast of Calabria in southern Italy.

The Italian judiciary opened an investigation into the tragic incident following accusations of weak response from the Italian maritime authorities.

The incident shocked Italy and sparked fierce criticism of the right-wing government of Giorgia Meloni, who was elected on promises to crack down on illegal immigration.