The bodies of 25 African migrants trying to reach Italy from Libya have been found in the hold of a boat so packed with people it was difficult for them to breathe.

Hundreds of migrants fleeing unrest and conflict in Libya and the Middle East and famine in the Horn of Africa are believed to have died since the beginning of the year in desperate journeys across the Mediterranean.

The Italian coastguard said the 50-foot boat was carrying 296 people, including women and children. Some were stowed in the hold, which also served as an engine room, according to the ANSA news agency. As the air became unbreathable from exhaust fumes some tried to escape but the boat was too packed for those standing above to move aside.

"From what they told us upon arrival there was no air to breathe, apparently they were so crammed there was nowhere to go," said Laura Boldrini, a spokeswoman in Italy for the UN High Commission for Refugees.

At least some of the migrants may have died from asphyxiation, she said.

Boldrini added that the desperate conditions apparently led to tension and scuffles on board as people struggled to survive. An investigation is under way.

Officials found the bodies – all young men – after boarding the boat a few miles off Lampedusa, the small island closer to north Africa than to the Italian mainland. One photograph in Italian newspapers showed the lifeless body of a man being pulled out of the boat by rescuers.

Survivors were taken ashore and moved to an immigrant shelter on the island. All those who died are believed to be of sub-Saharan origin.

"The survivors are shocked," Boldrini said. Unscrupulous smugglers pack too many people on unsafe boats, she said, which leads to horrendous conditions for those on board. "You risk it all," she said. "It's ferocious."

According to survivors the boat set sail from Libya two days ago. Up to 50 Somalis fleeing famine were believed to be on board.

Around 20,000 people have arrived in Italy by boat in recent months following the unrest in Libya and Tunisia. Many of those making the journey are sub-Saharan Africans who were working in Libya and then fled as the conflict there intensified.

In April a boat believed to be carrying 300 migrants from Libya capsized, leaving 250 people presumed dead.

Separately, scuffles broke out in the southern city of Bari between immigrants held at a local centre and police, leaving scores injured. Footage from state broadcaster RAI showed immigrants occupying railway stations and hurling objects at police vans.

ANSA said the immigrants had been at the centre for months and were protesting at a lack of progress in processing their asylum claims.

Mohamed Munadi left his village in Tunisia near the Libyan border after his livelihood as a smuggler dried up. Waiting for a European travel permit in a detention centre in Puglia, Italy, is frustrating - but he lives in hope