By Tom Miles and Marina Depetris

GENEVA (Reuters) - At least 240 migrants have drowned off the coast of Libya within the last 48 hours, possibly as an unintended consequence of European efforts to stop people-smugglers and to train Libyan coastguards, the U.N.'s migration agency said.

Five rescue ships, coordinated by the Italian coastguard, were within sight of the migrants but, despite attempts to rescue them, most died, the International Organization for Migration's (IOM) chief spokesman, Leonard Doyle, said.

"Two rubber dinghies, which is what they are, rubber dinghies, packed with migrants, totaling over 300 we think in all ... have succumbed to the waves off Libya in very bad weather," he said.

Migrant arrivals in Italy surged to 27,388 in October, more than the two previous Octobers combined, and bringing this year's total to more than 158,000, IOM's Italy spokesman, Flavio di Giacomo, said.

Migrants have told the IOM that smugglers say European training of Libyan coastguards means that rescue missions will soon be handed over to Libya and so any rescued migrants will be taken ashore in Libya rather than in Italy, Giacomo said.

That might be causing the rush, despite the bad weather, he said.

According to Doyle, the use of dinghies, especially unsuitable for the long sea crossing in bad weather, was partly due to European navies capturing and destroying many of the fishing boats that smugglers had been using.

"In the absence of those boats and with the migrants determined to leave, and the smugglers interested in making money off them, they have been putting them in completely unsafe rubber dinghies," he said.

Survivors from one dinghy, whose passengers included about 20 women and six children, all believed to be from West Africa, said they set off from Libya at about 3 a.m. (0500 GMT) on Wednesday, but the boat sank after a few hours.

Twelve bodies were recovered, including three babies, and about 27 survived, di Giacomo said.

Another two women said they had survived the sinking of a second dinghy at about the same time. Theirs was carrying about 130 people, they said.

The IOM said the latest deaths meant 4,220 migrants had died in the Mediterranean so far this year, compared with 3,777 in the whole of 2015.

Separately, Italy's coastguard said rescuers pulled about 766 people to safety from boats in difficulty in the central Mediterranean on Thursday, and found the dead body of one woman.

(Additional reporting by Isla Binnie in Rome; Editing by Louise Ireland)