A boat packed with up to 700 migrants capsized in the Mediterranean Sea off the coast of Libya with hundreds feared dead, officials and aid agencies have said.

An Italian Coast Guard spokesman said first reports indicated there were between 400 and 600 people on board, and that 25 bodies had been recovered so far.

UN refugee agency UNHCR said about 400 people had been rescued and 25 bodies had been recovered so far, although it is still not clear exactly how many people were on board.

UNHCR spokesman Federico Fossi said as many as 100 people may have been in the hull when the steel boat capsized as rescue ships approached it.

Médecins sans Frontiéres, whose rescue ship Dignity 1 was in the area, said in a tweet that the boat was believed to have been carrying about 700 people.

"The team on the Dignity 1 can confirm that there have tragically been many deaths but does not have figures at this stage," one of its tweets said.

One of the youngest migrants rescued was a one-year-old girl from Palestine. MSF said she was under water when her father pulled her to safety.

An Italian coastguard spokesman said an overcrowded boat had overturned off the Libyan coast just as ships came to its rescue but had no further details.

The operation, which also includes Italian vessels and Irish naval vessel Niamh, is continuing, he said.

The Defence Forces said in a statement that LÉ Niamh arrived to assist the fishing vessel at 11.45am Irish time.

It said the vessel immediately capsized shortly after the deployment of two ribs.

Minster for Defence Simon Coveney said there has been a tragedy on a big scale and the loss of life is likely to be significant.

Mr Coveney said: "At 8am Irish time, the LÉ Niamh was tasked by the Italian Marine Rescue Co-Ordination Centre (MRCC) to come to the assistance of a fishing vessel north-west of Tripoli, which was in distress with an estimated 600 persons on board."

The Mediterranean Sea is the world's most deadly border area for migrants. More than 2,000 migrants and refugees have died so far this year in attempts to reach Europe by boat, compared with 3,279 deaths during the whole of last year, the International Organisation for Migration said yesterday.

In April, a fishing boat with up to 800 migrants sank, making it the deadliest shipwreck in the Mediterranean for decades and a symbol of Europe's long-running migrant crisis.

The 20m vessel capsized as it approached a merchant ship that had come to its assistance.