The new agreement between the United States and Morocco, allowing the American use of Moroccan air bases, is likely to involve Washington in a more active role in African as well as Middle East politics.
There are possible risks in the agreement for the US. But the Reagan administration has presumably weighed these and decided that the strategic advantages outweigh the hypothetical dangers.
Morocco occupies a crucial position on the map. It is on the northwest shoulder of Africa with a long coastline on the southern side of the Strait of Gibraltar, the gateway between the Atlantic and the Mediterranean. From Morocco, maritime routes between the two can be monitored, if not controlled.
Morocco is also roughly halfway along the air route from the US to the oil-rich Gulf, and thus offers a convenient staging or refueling post for aircraft of the US Rapid Deployment Force, should the latter be dispatched to the Middle East.
Transit rights for American aircraft in Morocco would be an alternative if European allies of the US - particularly Spain and Portugal - were reluctant to involve themselves, even indirectly, in a US operation in the Middle East.
The risks for the US include these:
* Too great a dependence on yet another absolute monarch in the Arab world--King Hassan, who admittedly has a record of survival, but who faces an articulate opposition at home.
* An improvement in US-Moroccan relations could mean a deeper American involvement on the side of King Hassan against the insurgents of the Polisario guerrilla movement, who are resisting his incorporation of the Western Sahara (once a Spanish colony) into his kingdom.
* The consequent sucking of the Soviet Union into that local conflict beyond Moscow's present peripheral support of Polisario, thus sharpening it into a superpower confrontation. (Polisario's main direct supporters to date have been Libya and Algeria.)
* The possibility that American support of Morocco could entangle the US as early as this August in an already bitter intra-African struggle that is threatening the survival of the Organization of African Unity (OAU). This centers on whether the OAU should recognize and admit to membership the Polisario government-in-exile, known as the Saharan Arab Democratic Republic (SADR).
* Strain in relations with Spain--formally admited to NATO May 30--if British concessions to the Spanish on the question of Gibraltar prompt Morocco to demand at least parallel concessions from Spain on the two Gibraltar-like enclaves, Ceuta and Melilla, which Spain has long maintained on Moroccan territory.
* Strain in relations with France, which--under Socialist President Francois Mitterrand--has tilted its North African policy away from Morocco and toward Morocco's main rival in the region, Algeria.
It was a significant but unplanned coincidence that when King Hassan of Morocco was in Washington for talks with President Reagan the week before last, French President Mitterrand was conferring with Algerian President Chadli Benjedid in Algiers. Mr. Mitterrand, bound for a visit to French-speaking sub-Saharan Africa, was breaking his journey in Algiers for ''working talks'' with Mr. Benjedid.
On his side King Hassan is apparently aware of the sensitivity of the agreement reached with the US. The Moroccan news media speak of military cooperation with the US with little or no emphasis on American use of Moroccan facilities for US purposes.
''US bases'' is, of course, a potentially explosive trigger phrase in both the Arab world and Africa. And King Hassan would come under heavy attack from other Arabs if he seemed to be opening the way for US use of Moroccan facilities in any American action in support of Israel.
(The main facilities being made available to the US are the military side of the international airport at Casablanca and the military airfield at Sidi Slimane, northeast of Rabat.)
From the King's point of view, the risks he is taking are worth the US military supplies and diplomatic support he counts on getting in his struggle with Polisario and its patrons over the future of the Western Sahara.
The next crisis in that struggle is likely in August, when the yearly OAU summit is due to convene in Tripoli, Libya. At that meeting, Libyan leader Muammar Qaddafi is scheduled to assume chairmanship of the organization for 1982 -83. But the August gathering is already in doubt because of a major row over the SADR's (i.e., Polisario's) admission to membership.
POLISARIO supporters allege the US is already twisting arms in Africa to win support for Morocco's fierce campaign to keep the SADR out--and to torpedo the Tripoli meeting, with which Colonel Qaddafi is hoping to enhance his influence and prestige in Africa.
Whether that specific charge is correct, the official US position is that King Hassan was acting in a ''highly positive'' manner when he went along last year with the OAU's call for a cease-fire in the guerrilla war in Western Sahara as a prelude to a referendum there on the territory's future.
Logically it would follow--although the US has not yet said so--that (in the American view) SADR membership in the OAU should await the outcome of this as yet unscheduled referendum.