Tripoli (AFP) - A baby's body was found after a shipwreck Tuesday off the coast of Libya, an official said, while at least eight migrants are missing at sea.

A boat carrying 27 people sank near the coastal town of Sabratha, to the west of the Libyan capital Tripoli, said Bassem al-Gharabli who heads the local office combatting illegal migration.

The figure is based on testimony from the 18 survivors, whom Gharabli said were rescued after fishermen alerted the coast guard.

The group attempting to cross the Mediterranean Sea included seven women, said Gharabli without detailing the migrants' nationalities.

The International Organization for Migration's Libya office confirmed the shipwreck and said 15 people were hospitalised.

"Some of whom have fractured bones, according to IOM doctor onsite," the IOM wrote on Twitter.

Thousands have died in recent years trying to cross from North Africa to reach European shores, crammed into rickety boats by people smugglers.

Libya has been a key departure point for those hoping to reach Italy, 300 kilometres (185 miles) to the north.

But a controversial decision to Rome to close its ports to rescue ships has slashed the number of arrivals over the past few months.

Nearly 350 migrants have reached Italy so far in 2019, according to figures from the UN refugee agency.