TRIPOLI (Reuters) - Libya’s coastguard rescued nearly 500 migrants on Tuesday at sea west of the capital Tripoli, a spokesman said, underlining the challenge of trying to slow an exodus from Africa and the Middle East.

The migrants included people from sub-Saharan countries, Egypt, Morocco and Tunisia.

“Coastguards rescued early morning today 140 illegal migrants west of Tripoli and another group of 164 migrants were rescued off Sabratha including seven women and six children,” a spokesman for Libya’s naval forces told Reuters.

Later another group of 150 were rescued off Tripoli.

Hundreds of thousands of migrants have crossed the Libyan desert and taken to flimsy boats on the Mediterranean in the hope of reaching Europe in recent years.

A plan was agreed in Paris on Monday by four European countries and three African states, including Libya, to support nations struggling to contain the flow of people.

Leaders agreed on the principle of setting up a mechanism to identify legitimate migrants fleeing war and persecution, and to use the United Nations to register them in Niger and Chad so as to prevent them from being exploited by people smugglers.

Libya has been in turmoil since an uprising six years ago overthrew former leader Muammar Gaddafi. </s> Italian naval ships and vessels from nongovernment groups rescued thousands of migrants off the Libyan coast on Monday, the latest surge in desperate attempts to flee to Europe driven by war, poverty, and human traffickers.

The dramatic operation took place just 21 km (13 miles) north of the town of Sabratha in Libya. Groups such as Proactiva Open Arms and Doctors Without Borders helped take on some 3,000 people who had been traveling in some 20 small wooden boats.

In images and video by The Associated Press, migrants from Eritrea and Somalia cheered as the rescue boats arrived, with some jumping into the water and swimming toward them while others carefully carried babies onto the rescue ships.

Tens of thousands of Africans take the dangerous Mediterranean Sea route as a gateway to a better life in Europe, alongside those fleeing wars from Syria to Afghanistan.

Libya’s chaos and lack of border controls have made it into a transit route. Since the 2011 ouster and killing of longtime Libyan dictator Moammar Gadhafi, the country has sunk into lawlessness, facing a myriad of militias vying for influence and an emerging Islamic State affiliate.

In June, the European Union expanded its anti-smuggling operation in the central Mediterranean to include training Libyan coastal and naval forces, which are intercepting boats and returning migrants to Libya, where some are being held in abusive conditions.

Rights groups and experts estimate that there are about 3,500 migrants held in roughly 20 official detention facilities across Libya. Others are held in informal detention centers controlled by criminal gangs or armed groups. </s> ROME — The Italian coast guard says 6,055 migrants have been rescued in one day in the Mediterranean off Libya. Nine bodies were recovered.

The coast guard said it a total of 39 rescues Monday in the sea about 30 miles north of Tripoli. Smugglers took advantage of the first day of calm seas after days of rough waters to launch vessels crowded with migrants who pay them in hopes of reaching European shores.

Most of the vessels were rubber dinghies, but there were also two rafts.

Doctors Without Borders said the dead included a 23-year-old pregnant woman.

Italian coast guard and navy ships, as well as vessels in European Frontex sea patrols and several humanitarian organizations, participated in the rescues.

Two migrants needing medical care were flown to Sicily's Lampedusa island. </s> Over 3,000 migrants are rescued on Monday off the coast of Libya with the majority of them hailing from Eritrea and Somalia. One of the 20 boats contained over 700 refugees that were rescued 13 miles from Sabratha, Libya. They were rescued by two NGO’s and the Italian navy in the Mediterranean Sea
The Libyan Navy rescues nearly 500 migrants in three operations in the seas west of the capital Tripoli.