MEXICO CITY (AP) _ Mexico, flush with new bank loans, unexpected oil revenues and greater export sales, has built its international reserves up to at least $15 billion, analysts say.

Just a year ago, the country was running low on cash after international oil prices tumbled sharply, slashing the crude earnings of the oil-dependent nation.

As a result, the government was forced to negotiate a $14.4 billion rescue package with international financial organizations, foreign banks and industrialized nations.

With its new riches, Mexico has changed from being ''a beggar, a pauper'' to the ''darling of the international set,'' said Riordan Roett, director of Latin American Studies at Johns Hopkins' School of Advanced International Studies in Washington.

Government officials have been slow to spend the money, concerned in part about the effect of a huge injection of cash into the economy, already suffering from high inflation.

''It is not possible that the economy can absorb those reserves even for productive investment,'' said private economic consultant Rogelio Ramirez de la O.

''What they've done is wise,'' he said, ''because the reserves are not wasted. In the absence of something specific, concrete to do with the reserves, the only thing to do is keep them safe.''

Treasury Secretary Gustavo Petricioli told local reporters this week, ''We cannot nor should we squander or waste these reserves.''

The government, he said, needs a cushion of money in case of changes in the international economy.

Moreover, he said, President Miguel de la Madrid's administration wants to leave enough money in the coffers to give the next president room to maneuver in developing an economic plan.

De la Madrid's term expires at the end of 1988. His ruling Institutional Revolutionary Party is scheduled to announce shortly its presidential candidate.

''They are having a difficult time figuring out how to use the money without causing an inflationary impact on the economy,'' said a financial analyst who spoke on condition of anonymity.

Officials would like to use the money, he said, to stimulate the weak economy without adding to the inflation rate.

Consumer prices skyrocketed 67.5 percent in the first seven months of this year, and analysts predict a pace of 120 percent or more for the year as a whole. The inflation rate reached a record 105.7 percent in 1986.

Some analysts believe government officials cannot agree on how to spend the money.

''It is somewhat ironic that this growing mound of riches has become a political football within the Cabinet,'' wrote Patricia Nelson, financial columnist for the English-language daily, the Mexico City News.

The financial analyst who demanded anonymity said the government is considering ways of using the money to reduce its huge foreign debt of about $105 billion, the second highest in the developing world after Brazil.

Under one option, the government would buy back some of its loans from foreign banks at a discounted rate, which would ease the country's burden of interest costs on the debt. The government is expected to pay about $8 billion this year in interest charges.

On Friday, Mexico signed an agreement to reschedule $9 billion worth of Mexican private sector debt. The pact was reached with 210 international banks.

Analysts also argued that the government should invest some of the excess money in development projects that would provide work for the unemployed and add to the economy's productive capacity.

The financial daily El Financiero recently quoted unidentified government sources as saying de la Madrid was expected to spell out the use of the reserves in his state of the union address Sept. 1.

In his message of September 1986, the president said the nation had international reserves of $4.5 billion, $1.3 billion less than at the end of 1985.

By the end of last year, the reserves had grown to $6.8 billion. Six months later, Miguel Mancera, director of the Bank of Mexico, the central bank, reported reserves had hit a historic high of $13.1 billion.

Since then, analysts estimated the balance has grown further, to $15 billion to $16 billion.

The increase in the reserves is attributed to a variety of factors:

-The nation has had a fresh injection of foreign loans. On April 30, the government drew $3.5 billion of the $7.7 billion commercial loan package.

-Companies have increased their exports. The government reported a trade surplus of $4.5 billion in the first six months of 1987, up 203 percent from the same period a year ago.

Total exports registered $10.3 billion in the January-June period, up 33 percent from the same period a year ago.

-Oil prices have risen to around $20 a barrel on the world spot market. Petroleum exports grew 38.1 percent in the first six months of the year.

A local commercial bank estimated that with the rise in oil prices, the nation will earn $8.2 billion in crude sales this year. It gained only $5.6 billion last year, off sharply from the $13.3 billion of 1985.

-Mexicans who socked away millions of dollars outside the country at the start of the economic crisis have brought some of the money back to invest in their companies, the booming stock market or other high-paying instruments.

Ramirez de la O predicted about $1.5 billion would return this year, nearly the same as the estimated $1.4 billion of 1986.