The bodies of 17 migrants have been found washed up on a Libyan beach after their boat capsized during a bid to reach Europe by sea, the coast guard said on Wednesday.

Libya is a major departure point for desperate migrants, tens of thousands of whom board unseaworthy boats every year in attempts to reach Italian shores 300 kilometres (190 miles) away.

The voyages often turn deadly.

"Over the past 24 hours, the bodies of 17 migrants were found on the coast between the cities of Zawiya and Sorman, by Red Crescent teams," a coast guard official told AFP.

The victims drowned after their boat overturned, he said.

The Red Crescent in Zawiya, 50 kilometres (30 miles) west of the capital Tripoli, published images of corpses covered in shrouds.

The number of migrants who have died at sea trying to reach Europe more than doubled this year compared to the same period in 2020, the International Organization for Migration (IOM) said in mid-July.

Rescued migrants sit aboard a Libyan coast guard vessel arriving at the capital Tripoli's naval base on February 28, 2021
Rescued migrants sit aboard a Libyan coast guard vessel arriving at the capital Tripoli's naval base on February 28, 2021 AFP / Mahmud TURKIA

In September, the IOM counted 1,369 migrants who had drowned in the Mediterranean since the beginning of the year.

The latest deaths come days after a "security campaign" by Libyan authorities in the suburbs of Tripoli, mostly targeting illegal migrants.

"The numbers of migrants and refugees held in detention centres in Tripoli, Libya, have risen dramatically -- to more than threefold -- over the past five days," the aid group Doctors without Borders (MSF) said on Wednesday.

"The arrests and treatment during detention have often been violent, with multiple people beaten, injured and even killed."

It said "at least 5,000 migrants and refugees (had) been rounded up across Tripoli," including women and children, with many reporting violence.

The United Nations' Libya mission UNSMIL said at least one person had been killed and 15 wounded.

Rights groups regularly warn of dire conditions for migrants at detention centres in the country, where human traffickers have profited from a decade of violence following the 2011 fall of dictator Moamer Kadhafi to carve out lucrative but brutal businesses.