BESET by common problems ranging from Muslim fundamentalism to the possible loss of lucrative European export markets, the five countries of the North African Maghreb are putting historical animosities aside. The end of an era of wars, boundary disputes, and conflicting alliances is cautiously predicted by many officials and diplomats in the region, following an agreement by Algeria, Tunisia, Morocco, Mauritania, and Libya last February to strive for greater political and economic unity.
The turnabout has been driven mainly by domestic concerns. Overpopulation and underdevelopment have forced Maghreb leaders to subordinate regional ambitions to the more pressing task of alleviating social tensions.
The Maghreb stretches 3,000 miles from the Atlantic to the eastern Mediterranean. It is strategically important to the United States and its NATO allies. It is also a major market for US agricultural exports. Algeria, the largest Maghreb nation, is the sixth largest supplier of energy to the US.
The desire for greater unity has opened the door to wider consultation on problems, including the current threat to regional agriculture from massive locust infestations.
``It's crucial; it changes the atmosphere,'' says Abdel Aziz Khelaf, Algeria's secretary of state for Maghreb affairs, of the sober recognition of shared economic vulnerability that is pushing North Africa toward greater unity.
And, North African diplomats say, the era of good feelings dawning in the Maghreb largely reflects the international atmosphere in which peaceful settlement of disputes has come into vogue.
``Why should we be the exception to this general trend?'' an Algerian foreign ministry official asks rhetorically.
The Arab Maghreb Union (AMU), created by February's treaty (See story below.), also reflects a worldwide trend toward regional cooperation which has now spawned no less than three economic blocs in the Arab world alone.
The way for greater regional cooperation has been paved by recent improvements in key bilateral relationships. With help from Algeria, Tunisia and Libya restored ties in 1987 after a two-year break.
The critical obstacle to unity was overcome in March. Algeria and Morocco capped a rapprochement that month when Morocco belatedly ratified a 1972 boundary treaty.
Morocco's earlier unwillingness to ratify the treaty had angered Algeria. Later, seeing a chance to outflank and isolate Morocco's King Hassan, Algeria backed the Polisario guerrillas fighting for independence for the Western Sahara, a former Spanish colony claimed by Morocco.
The decision led to a break in relations that left Algeria and Morocco on the brink of war for over a decade.
With the Polisario movement now on the defensive, there are signs that Algeria has grown weary of the 14-year conflict. Reported cutbacks in support for the guerrillas were hastened when rioters last October attacked the Polisario's office in Algiers to protest the diversion of government funds from pressing domestic needs.
Economic circumstances have also attenuated the historic animosity between the two countries.
In Morocco, underpaid teachers and workers are growing increasingly restive, threatening the national unity created by the popular but costly Polisario war.
In Algeria, meanwhile, the collapse of world oil prices drastically reduced government revenues. Now, support for the rebels has been sacrificed to winning Rabat's backing for a trans-Moroccan pipeline that would carry natural gas from Algeria to Europe.
``Algeria's future depends on it,'' notes one Western diplomat in Tunisia. ``The pipeline would ensure income for 50 years.''
Since last spring, Algerian President Chadli Benjedid and Morocco's King Hassan have developed a surprisingly close relationship. Diplomatic observers say that that is one reason why Hassan has been careful not to embarrass Mr. Benjedid by publicizing the Algerian decision to scale back support for the rebel movement.
``If Benjedid stumbles, the King is going to lose one of his great friends,'' says a Western diplomat in Rabat. In the pact signed in February, he says, the five Maghreb states pledged not to allow forces hostile to other signatories to operate on their soil.
Elsewhere, steps toward unity have exacerbated what Peter Sebastian, a former US ambassador to Tunis, calls ``the Maghrebian dilemma of Qaddafi-in or Qaddafi-out.'' In choosing to include Libya in their new economic union, the other leaders have calculated that it's safer to work with Colonel Qaddafi than to isolate him.
Given Qaddafi's history of seeking to destabilize Maghrebean regimes, there is a logic to having Libya sign a pact that commits the five parties to respect each other's borders. But some Western diplomats also warn that even though Qaddafi has chosen to join the AMU, the Libyan leader, driven by wider ambitions, is likely in time to resume his troublemaking.
``As soon as he gets himself out of the hole by being a respected member of a respected group, he'll go back to his old tricks,'' one Western diplomat in Algiers predicts.
Nor will the accent on unity within the Maghreb end the competition for regional leadership between socialist Algeria and monarchist Morocco, diplomatic sources in the region caution. But in the future, the rivalry is likely to be channeled more into the search for expanded diplomatic roles in the Arab world.
Both countries have recently been awarded the privilege of hosting Arab summits. Arab leaders met in Algeria last June and will convene in Morocco on May 23.