The oil boom that was supposed to fuel Mexico's development for a generation evaporated this past week as oil prices fell $5 a barrel. With so much in Mexico hinging on a continuation of high oil revenues, the price slash was a move that President Miguel de la Madrid Hurtado would have avoided if possible. The $5 a barrel cut translates into a $2.5 billion loss in revenue.
But to remain in the business of selling its oil abroad, Mexico had to compete with the benchmark pricing of the Organization of Petroleum Exporting Countries, which earlier cut basic crude prices to $29 a barrel, from $34, in response to declining world demand.
That move means that Mexico will earn an estimated $12.5 billion from oil in 1983 instead of $15 billion as originally forecast.
For Mr. de la Madrid, in office a mere 3 1/2 months, it seemed that there was no end to the bad news. Last week Mexico also went hat in hand to foreign bankers to ask for a five-month extension of payments of principal on part of its $85 billion foreign debt.
In addition, the government reported a 1 percent decline in industrial productivity in January. Unofficial unemployment statistics suggest the rate of unemployment climbed to 24 percent in February, much higher than expected.
If there was any good news, it was Treasury Minister Jesus Silva Herzog's announcement that Mexico's foreign debt has been substantially restructured to eliminate the short-term obligations that brought the country into virtual default last year. Most of the debt ''is now in long-term obligations,'' he said.
With rescheduling, Mexico must pay just $1.5 billion in the 17 months from August 1982 to December 1983. Without rescheduling, however, the tab would have been $16.4 billion.
Mr. Silva Herzog puts the best public face that he can on the country's financial situation. With rescheduling, he said: ''We can now rest somewhat easy , because Mexico's economy should be able to absorb the shock of a reasonable lowering of oil prices.''
Neither Mr. Silva Herzog nor others in the government would say, however, whether the $5 a barrel slash in oil pricing is ''reasonable.'' But the oil price decline was a poor omen for celebrations commemorating the 45th anniversary of the Mexican government's takeover of the oil industry in 1938.
Those celebrations had been designed to fete Mexico's rapid climb into fourth place among world oil producers. As late as 1976, Mexico had been in 15th position.
Then, in the mid-1970s a series of oil discoveries, particularly in the scrub jungles of southeastern Mexico, spawned a prodigious petroleum boom. Mexico quickly began exporting oil. It used the oil revenues for a costly program of internal development.
A very heady mood of optimism prevailed. The ''black gold'' was expected to substantially lift Mexico out of backwardness. After all, oil was in short supply the world over and the oil price was rising.
But then the world oil glut developed. Demand for oil fell and prices tumbled. For Mexico, ''Everything that could go wrong did go wrong,'' says an official of the Mexican Finance Ministry.
The basic wrong, he admits, was the decision to base just about everything on petroleum.
In six years, oil alone has come to account for three-quarters of Mexico's exports. Now, of course, in a declining world market for petroleum, Mexico must rely on oil for most of the dollars needed to service its foreign debt and to carry on some of the expansionary development projects begun in the late 1970s.
Oil continues to flow as fast as ever from Mexico's wells - which produce 2. 75 million barrels a day. Exports total 1.5 million barrels per day, half of which goes to the United States.
But without visible alternatives, Mr. de la Madrid finds Mexico's future mortgaged to the vagaries of the world oil market.