Mexico City — Mexico is quietly edging away from its recent support of leftist guerrillas in El Salvador, the Sandinista leaders in Nicaragua, and Fidel Castro in Cuba.
But this dramatic change in Mexican foreign affairs will not be as much seen as felt - since Mexico's political leaders are walking a tightrope in this presidential campaign year.
Faced with economic chaos and rising public anger at home, they worry that the revolutionary change Mexico has long supported in Central America could eventually sweep over Mexico.
President Jose Lopez Portillo and his designated successor, Miguel de la Madrid Hurtado, who will be elected in July and take over in December, are both acutely aware of this threat.
Their challenge is to maintain Mexico's 70-year tradition of ''revolution'' - which has included both verbal and material support for guerrilla groups in Latin America - while dampening any flames of real revolution at home by somehow solving the country's economic problems.
It is a tall order. But Mexico's political stability may depend upon the success of this juggling act.
Mr. de la Madrid is talking of revolution in his speeches. But he privately indicates much less support for change elsewhere.
Being true to Mexico's revolutionary tradition is necessary if Mr. de la Madrid is to keep the support of Mexico's militant workers, who form the backbone of the Institutional Revolutionary Party, the dominant political party. The party's very name suggests how important revolution is in Mexican political psyche.
But top party leaders, along with Mexican military and business groups, are now convinced that Central America's growing malaise will affect Mexico if the guerrillas in El Salvador and in Guatemala eventually prove successful. With Mexican economic problems becoming increasingly serious and public protests over the economy becoming more audible, revolution on Mexico's southern flank has unpleasant connotations for Mexico's power structure.
Mexico's economic dilemmas are, in part, fanned by its newfound oil wealth. Oil is not proving to be the bonanza that many Mexicans thought it might become. In the first place, oil has broadened the gap between rich and poor. Official Mexican statistics suggest that fully half of Mexico's burgeoning population of 75 million is poor.
Secondly, the world oil glut has meant both declining oil sales and fewer dollars for Mexico. Many development projects started in the past five years are cash short.
It is likely that the oil glut will prove short-lived and that cash shortfalls will be temporary. But for the moment Mexico is deferring projects aimed at cutting the gap between rich and poor, even though 40 percent of adult Mexicans are unemployed or underemployed.
Inflation is also a factor in the rich-poor gap. At 30 percent or possibly higher, the middle class is squeezed and many lower-middle-class people are not holding their own on the economic ladder.
Mexicans show growing cynicism about their government. Corruption is not new, but oil wealth is spawning rampant corruption that has led to public outrage.