Two boats carrying hundreds of passengers have capsized in a 24-hour period in the Mediterranean Sea between Libya and Italy, possibly leaving dozens of refugees dead, according to the United Nations refugee agency.

Barbara Molinario, public information officer at the UNHCR's Italian branch, said rescue operations are complicated by the large volume of passengers on the vessels carrying refugees and migrants.

"Usually nobody really knows the exact number of people on a boat like that," she told Al Jazeera by telephone on Thursday.

"We are now waiting for the survivors to come so we can talk to them. That's going to be the only way to know there are people missing."

The Italian coastguard released images of a shipwreck a day earlier, in which at least five people died when the boat went over off the coast of Libya.

The blue fishing vessel, its deck heaving with people, tipped over on Wednesday after passengers rushed to one side on spotting a rescue ship.

Those on the boat, many of them men, some already wearing orange lifejackets as a precaution, were captured in rare photographs as they clung to the boat's rails or each other, or dropped into the sea.

Some are seen hanging on to the starboard edge by their fingertips as the trawler rolls, while others try to balance on the rim.

Pictures taken seconds later show the waters around the boat filled with people trying to get away from the vessel which, now overturned, begins to sink, with people still perched on its upturned hull.

The navy said its Bettica patrol boat had spotted "a boat in precarious conditions off the coast of Libya with numerous migrants aboard" but the trawler overturned shortly afterwards "due to overcrowding".

The Bettica threw life-rafts and jackets to those in the water, while another navy ship in the area sent a helicopter and rescue boats.

Survivors can be seen in the photographs wearing life-rings, some swimming towards the Bettica as the helicopter whirrs overhead.

The navy said 562 people had been pulled to safety.

The operation wound up late on Wednesday without finding any further survivors or victims.

Those on board had sounded the alarm by calling for help using a satellite phone some 18 nautical miles off Libya.

The Bettica went on to save another 108 refugees and migrants from their dilapidated vessel in a second rescue operation on Wednesday.

In a separate incident on Thursday, reports suggested that several people died on board or fell over on a boat that arrived on the Italian coast, said the UNHCR's Molinario.

"It takes at least three days from Libya to Italy and many more from Egypt. These are very dangerous routes and accidents are just waiting to happen," she said.

"Our position is that people who are forced to flee and cannot return home need to be given a safe means to get to Europe and ask for protection. If they are forced to risk their lives and turn to smugglers, then this is what's going to happen."

According to the International Organisation for Migration, more than 1,370 people have lost their lives so far this year trying to make the crossing to Europe.

The latest arrivals bring the number of people rescued and transferred to Italy since the start of the year to nearly 40,000 following the rescue of more than 6,000 since Monday, according to figures collated by UNHCR and the coastguard.

The overwhelming majority of those arriving in Italy so far this year have been from sub-Saharan Africa.

Italian media reports warned that the number of minors arriving was on the rise.

The UNHCR, aid organisations and the Italian government say there is no sign yet of Middle Eastern refugees switching to the Libyan route to Europe following moves to restrict access from Turkey via the Greek islands.