Mexico said yesterday that it had lined up more than $20 billion in loans and lines of credit that it might tap in an effort to ensure economic stability during next year's presidential election.

The loans, which include some that were previously pledged and others that renew existing credit lines, come from the International Monetary Fund, the U.S. and Canadian governments, the World Bank, and the Inter-American Development Bank. The money is aimed at keeping President Ernesto Zedillo's six-year term from ending the way nearly all of his recent predecessors' terms have ended -- in a panicky flight by investors and lenders fearful that the country is on the verge of bankruptcy. In many past election years, the government has gone on spending binges aimed at winning support for the ruling Institutional Revolutionary Party, or PRI.

"This will provide us with the conditions necessary to have an orderly economic transition at the end of the six-year administration," Guillermo Ortiz, the governor of Mexico's central bank, said at a news conference in Mexico City.

The move comes amid nervousness in financial markets that next year's elections, which are expected to be hotly contested, could be afflicted by the sort of political instability, economic mismanagement and capital flight that caused the peso to plunge in 1994, weeks after Zedillo's electoral victory. The peso crisis rocked global markets and prompted the Clinton administration to lead a $50 billion bailout for Mexico that sparked criticism on Capitol Hill.

The administration, the IMF and their allies contend that this time around, Mexico is in much better economic shape and will use its international support to buttress sensible policies. The government has won praise from economists for keeping its budget and trade deficits under control, and Zedillo has sworn to keep from repeating the mistakes of his predecessors. The loans are designed to guard against a sudden loss of investor confidence by providing the government with extra resources if the need arises and by assuring markets the government is sticking to a sound policy path.

In announcing that the IMF board would meet in early July with an eye toward approving a $4.1 billion standby loan for Mexico, IMF Managing Director Michel Camdessus hailed Mexico's recent economic performance for being "resilient in the face of international market turbulence." Unlike other big Latin American countries -- notably Brazil and Argentina, which have fallen into recession -- Mexico has weathered the global financial crisis and is expecting economic growth of 3 percent this year.

Camdessus noted the government had pledged to keep its budget deficit at 1.25 percent of gross domestic product this year, the same as last year, and reduce the budget gap further to 1 percent of GDP in 2000.

Treasury Secretary Robert E. Rubin echoed Camdessus's positive assessment, saying in a statement that "Mexico's commitment to a sound economic program, supported by the IMF, should improve prospects for continued strong economic performance."

Rubin announced that the Treasury and the Federal Reserve had renewed a $6.8 billion credit line for Mexico for another year, as expected, together with Canada, Mexico's other partner in the North American Free Trade Agreement. The U.S. Export-Import Bank has provided $4 billion in trade credits, and the World Bank said it is extending $5.2 billion in loans between now and 2001 "to improve social conditions for the country's poor, to reinforce macroeconomic stability and to strengthen reforms to public governance." The Inter-American Development Bank is providing an additional $3.5 billion.

Some of those loans were previously pledged, but Mexican markets rallied strongly on the announcement, with the stock market rising as much as 4.3 percent during the day.

"This is extremely bullish news. It puts Mexico as the best-positioned country in Latin America to continue to weather international financial market turbulence," said Paolo Leme, chief of emerging-markets research at Goldman Sachs Group Inc.

Some experts voiced skepticism, however.

Charles Calomiris, a Columbia University professor who has been critical of international lending to Mexico, acknowledged that "there is a legitimate argument" that Mexico's economic fundamentals have improved and that the country needs protection against an irrational investor stampede.

"But the risk is that as the PRI gets into this election, they start to lose support," Calomiris said. "And even though Zedillo really means it that he won't go on a fiscal binge, the PRI may tell him, `You don't have a choice.' These things tend to happen around election years in developing countries."