Overshadowed by the Reagan administration's confrontation with Libya, Algeria has launched a major diplomatic initiative to "contain" Col. Muammar Qaddafi and stabilize turbulent North African politics.

What western diplomats call Algeria's "constructive engagement" policy -- borrowing Washington's term for its relationship with South Africa -- was formally unveiled by President Chadli Bendjedid in a speech last week outlining a proposal for North African unity.

Algerian officials stressed that the plans hinge on tying the volatile Libyan leader into a web of specific economic cooperation deals that range from natural gas to electronics and are aimed at dissuading him from further regional troublemaking.

The Algerian approach runs counter to the Reagan administration's efforts to isolate and confront Qaddafi. Washington has yet to comment officially on the Algerian initiative.

Western and Arab diplomats are convinced Algeria is motivated principally by a desire to protect its small neighbor, Tunisia, from Libyan encroachment and the disputed Algerian-Libyan border. They noted, however, that the initiative also would weaken Algeria's arch rival, Morocco, in its 20-month-old alliance with Qaddafi. For different reasons, the United States and Algeria oppose that alliance.

Bendjedid feared encirclement by two neighbors at a time when King Hassan II of Morocco was achieving the upper hand militarily in his 10-year-old dispute with the Algerian-backed Polisario rebels for control of the Western Sahara.

The United States, with a large military and strategic stake in conservative Morocco, was worried by potential Libyan subversion in a traditionally friendly country that guards the southern approaches to the western Mediterranean.

Western diplomats noted that Algeria, mindful of American suspicions about Qaddafi, has kept the United States closely informed about its recent negotiations with Libya.

Algerian officials, outlining their containment policy, argued that Algeria is doing the West a service by launching a regional initiative to promote stability. The officials also reflected a deeply held conviction here that for Libya's neighbors, such as Algeria, Egypt and Sudan, confrontation -- with its risk of superpower involvement in the region -- is potentially more dangerous than Algiers' cautious willingness to work with Qaddafi on a step-by-step basis.

Algerian officials made it clear, however, that they also want to reinforce recently improved relations with Washington. They hope the United States eventually can influence its Moroccan ally for a favorable political settlement in the Western Sahara.

Last week's major departure in Algerian foreign policy was foreshadowed in November when an increasingly isolated Qaddafi dispatched envoys to Algiers to ask for a summit meeting with Bendjedid.

Two months earlier, Algeria had rushed troops to the Libyan border when Qaddafi expelled Tunisian workers and threatened the vulnerable government of aging Tunisian President Habib Bourguiba. By the time the Algerian and Libyan leaders met Jan. 28 near the Libyan border, Bendjedid's initiative was ready. Within a month, Algerian Prime Minister Abdelhamid Brahimi had led nine ministers to Tripoli and worked out a program of joint economic ventures.

Underscoring Algerian caution was Bendjedid's insistence that, unlike earlier, doomed North African unity schemes, his would put concrete economic cooperation ahead of political union. Significantly, he mentioned no timetable for future steps toward unity.

Nor has Algeria abandoned its opposition to Qaddafi's occupation of northern Chad and his backing of rebels opposed to President Hissene Habre's American- and French-backed government.

Bendjedid specifically ruled out any Moroccan participation in the unity scheme until the Western Sahara had been settled.

Despite optimism over the Bendjedid initiative, diplomatic analysts suggested that Morocco may already have concluded that its alliance with Libya had reached the point of diminishing returns.

Morocco has been losing the diplomatic battle against Algiers' efforts to win international recognition for the Polisarios' political wing, known as the Democratic Arab Saharawi Republic. Last week, Morocco opened U.N.-sponsored talks with Polisario representatives.