MEXICO, A YEAR AGO, was caught in a profound and dangerous financial crisis. The peso was dropping like a stone, inflation was flying out of control, trade was paralyzed, and for a time the country seemed to be sliding toward default on foreign loans of more than $80 billion. A series of emergency loans was hastily cobbled together by the U.S. government and the Bank for International Settlements, but it was only the most temporary kind of help.

Last week, Mexico paid off the loans from the United States and the BIS, an impressive demonstration of the Mexican economy's strength. The strain on the country remains severe, and the huge debt continues to hang over its prospects. But, as the repayment suggests, the country is not destitute of resources.

The most important of them is oil. Mexico has now become the United States' chief source of imported oil, an arrangement that serves both countries well. Oil revenues alone won't restore the Mexican economy to balance: the misuse of oil wealth was an important part of the explanation for the crisis last year. But it provides a large and stable stream of dollars crucial to any industrial revival.

Inflation, which was well over 100 percent a year last summer, is still high but has begun to fall significantly. The peso trades at one-sixth the value at the beginning of last year, and barter pays for much of the country's imports. But last year's large trade deficit is now a large surplus.

The signs of returning vitality in Mexican commerce are, among other things, a triumph for the International Monetary Fund. The IMF has worked hard and effectively to help Mexico avoid default, keep its credit lines open, and steer its affairs back toward a durable balance. It's a pity that the U.S. Congress, with all its complaining about the IMF and all its foot-dragging on the legislation to strengthen it, has not been paying attention to its considerable achievements in the one country in Latin America that is most immediately important to this one.

The IMF will continue to be helpful. The economic recovery here will be immensely beneficial to Mexico. But in the end the crucial thing will be Mexico's ability to adapt to a new stage of its own, and the world's, development. In the late 1970s, the Mexicans, like a lot of other people, were living on borrowed money. Now the flow of borrowings has abruptly ended, and the Mexicans are going to have to find ways to replace it with earned money. That probably requires more competitive industrial production than Mexico has achieved in the past. The drastic fall of the peso has imposed much hardship, but, at the same time, it provides Mexicans with an enormous opportunity to push into world markets as they now begin to expand.