MEXICO'S money troubles have turned into a three-alarm international emergency. The United States, necessarily, has extended first aid in the form of cash against future oil deliveries. Some of the commercial banks in this country and in Europe are postponing payments on their loans. That's to try to prevent the present panic from spiraling into financial collapse. The second stage of help will have to be larger loans from the International Monetary Fund with, as usual, conditions attached. The political repercussions will be severe in a country that until very recently was swept up in the boundless optimism of sudden oil wealth.

Oil and gas wealth, and its recent history in the countries that it endowed in the 1970s, bring to mind the old fairy tales about people who found pots of gold. Those stories generally end with warnings about the sad effects of too much money, too fast. Two of the greatest beneficiaries, Iran and Iraq, are now at war with each other as their standards of living slide rapidly backward. The Dutch used their North Sea gas discoveries for huge increases in social benefits and wages. The result today is the highest unemployment in Europe and a budget deficit that's spectacular by even American standards. At the other end of the income scale, the recent decline in oil prices and sales has knocked Nigeria's ambitious development plans askew. Meanwhile, with the plan's emphasis on industrial expansion, Nigeria's ability to feed its own people has actually declined.

Mexico's experience deserves the closest attention by anyone who is trying to follow the strange effects of the oil revolution on the world's political economy. Mexico at first intended to keep its oil revenues at a moderate level set by its ability to reinvest the money productively in development. But those good intentions got swamped in the sudden rush of new wealth. It suddenly seemed that the sky was the limit and, where oil revenues didn't quite meet the ballooning demands, the big banks, mostly American, were happy to offer loans. Although Mexico's oil-fed export earnings soared through the 1970s, by the end of the decade, the payments on foreign debts took a higher share of those earnings than at the beginning. Every calculation was based on an assumption of continued rapid increase.

With the modest but unexpected decline in oil prices beginning last year, the whole process began to run in reverse. As oil revenues dropped, the foreign banks began to get nervous and cut off new lending. The shortage of foreign exchange has now set off a feverish run on the peso. The remedy is going to require a retreat from social benefits already extended, let alone those promised for the future.

If the recent sag in the oil market has thrown Mexico into great jeopardy, it has also created a great test of American leadership in helping a neighbor return to stability. Americans -- because of oil, because of the bank loans, above all because of proximity -- have an interest in Mexican prosperity that is second only to that of Mexicans themselves.