RABAT, Morocco (AP) _ Algeria's president has suggested ending 10 years of hostility between Morocco and his nation by merging North African nations from Libya to Mauritania, the official Moroccan News Agency has reported.

The only condition on such a union envisioned by President Chadli Bendjedid was forming a separate component of the disputed Western Sahara, the agency said on Wednesday, reporting a speech that was broadcast on Algeria's state television network.

Morocco severed relations with Algeria a decade ago to protest Algerian support for the Polisario guerrilla movement fighting for the independence of the Moroccan-annexed Western Sahara.

There was no immediate official Moroccan comment on Bendjedid's speech, but its unusual distribution of the text by the Moroccan agency indicated that it was taken seriously by King Hassan's advisers.

Tunisia, Algeria, Morocco, Libya and Mauritania would be in the union.

Libya and Morocco accepted the idea of a merger last year.

While insisting repeatedly that the Western Sahara's inhabitants have the right to self-determination, Bendjedid did not make a single reference to the Polisario, nor to its would-be ''Sahara Arab Democratic Republic'' recognized by more than 60 nations.

Algeria is among the countries formally recognizing the Western Sahara as a sovereign state.

''Algeria believes ... in the creation of a united Arab Maghreb (North Africa),'' Bendjedid was quoted as saying by the Moroccan news agency.

According to the Moroccan news agency he said: ''We agree to meet (at a summit conference) ... to discuss the problems between us - above all the Sahara question. ... The Algerian people are unionist, but in clarity and without anarchy.''

He added that ''the Saharans must take part in one way or another. If this summit takes place, we will never accept any commitment as long as the Sahara problem remains unresolved....

''We believe in the common future of a united Maghreb in the mutual respect of the regimes and institutions of each country,'' the news agency quoted the president as saying.