The United States Thursday urged Morocco and Algeria to re-engage in efforts to resolve the Western Sahara dispute, following the release of the last Moroccan prisoners from the 16-year war. U.S. Senate Foreign Relations Committee Chairman Richard Lugar witnessed the release in western Algeria.

The detention of the Moroccans by the Algerian-based Polisario Front had been a major irritant in Moroccan-Algerian relations, and in efforts to finally settle the Western Sahara issue.

Now, with the release of the last 404 prisoners from the bitter conflict, both the United States and U.N. Secretary-General Kofi Annan are expressing hope it will help break the long deadlock over the disputed territory.

The Moroccan prisoners were released by the Polisario Front in the western Algerian town of Tindouf in a ceremony monitored by the International Committee of the Red Cross and by Senator Lugar, a special envoy of President Bush.

The Moroccans, many of them held more than 20 years under harsh conditions, were then flown back to Morocco on U.S.-chartered aircraft, their return also observed by Mr. Lugar.

At a news briefing, State Department Spokesman Sean McCormack welcomed the release and expressed appreciation to the Red Cross, Senator Lugar, and the governments of Algeria and Morocco for facilitating what he termed an important humanitarian effort.

He said the diplomatic success presents an opportunity to advance the cause of unity in North Africa's Maghreb region and the pursuit of a Western Sahara peace accord.

"We call on all parties to seize this positive development as an occasion for Morocco and Algeria to re-engage with each other in order to improve their bilateral relations and create a regional climate conducive to working together in the context of the U.N. and with the U.N. Secretary General's Personal Envoy, Peter Van Walsum," he said.

U.N. Secretary-General Kofi Annan named Mr. Van Walsum, a Dutch diplomat, to be his envoy for the Western Sahara last month.

He replaced former U.S. Secretary of State James Baker who resigned the post in 2004, frustrated over several years of unsuccessful efforts to get the parties to agree on a U.N. settlement plan.

Morocco took control of the adjacent Western Sahara after the colonial power Spain vacated it in 1975.

The Polisario Front, seeking independence for the area and supported by Algeria, waged war against Moroccan forces there for 16 years before a U.N. brokered cease-fire in 1991.

The United Nations plan calls for a five-year period of autonomy for the territory, which is still controlled by Morocco, followed by a referendum on self-determination.

Secretary-General Annan, in his statement on the prisoner release, called it a positive step and said he hopes it will foster better relations between the parties and contribute to overcoming the political impasse.

The 404 Moroccans released Thursday were the last of more than 1,000 Polisario prisoners and were believed to have been the world's longest-held prisoners of war.

Morocco released its last group of Polisario Front prisoners in 1996.