The International Committee of the Red Cross (ICRC) said it supervised the repatriation of 300 Moroccan prisoners of war released by the Polisario movement at the end of last week.
The ICRC said in a statement the prisoners were released by Polisario, which is fighting for the independence of the Western Sahara, in the Algerian town of Tindouf and were flown back to Morocco on Saturday.
ICRC delegates, including two doctors, spoke to each prisoner in private to establish that they were returning on their free will, it added.
The freed prisoners were flown home aboard an aircraft provided by the Libyan government, which had interceded to secure their release.
Since February 2003, 643 Moroccan prisoners have been released by Polisario, but 614 remain in detention. Most of them have been held captive at camps in the Sahara desert for more than 20 years.
ICRC visits the prisoners regularly to provide them with medical care and delivers parcels to them from their families
Polisario launched a guerrilla war against Morocco in 1976, when Spain withdrew its colonial administration from the Western Sahara and divided the desert territory between Morocco and Mauritania. Mauritania subsequently withdrew its claim and allowed Morocco to take control of the entire territory. Polisario continued fighting Morocco until 1991, when a ceasefire was declared.
Since then, the United Nations has been trying to broker a political settlement acceptable to both sides.
The latest UN plan, devised by former US Secretary of State James Baker earlier this year, offers the inhabitants of the Western Sahara a large degree of autonomy for five years, after which they would vote in a referendum for independence, continued autonomy or full integration with Morocco.
This plan was accepted by the Polisario and endorsed by the UN Security Council, but has been rejected by Morocco's King Mohamed VI.