Just 24 hours after taking office, Spain's government devalued the peseta by 8 percent today in an effort to counter the strong currency speculation that the Socialist administration's accession to power has prompted.

A televised statement by the government's chief economics minister, Miguel Boyer, said the dollar would be fixed at about 128 pesetas when markets open Monday, compared with 117.45 when they closed Friday. After that, Boyer said, the market would establish the final rate.

Boyer, an economist who holds the portfolios of economy, treasury and commerce, blamed the measure on "unjust doubts cast on the Socialist administration's ability to combat inflation." He said "exaggerated speculation" over the peseta's depreciation had caused "currency exports that must be drastically halted as soon as possible."

The move was a suprise. Following their landslide electoral victory Oct. 28, the Socialists had stated they had no plans for a stabilization program and would avoid drastic economic measures.

However, the peseta has fallen sharply in recent months and dropped 20 percent against the dollar this year. The relationship to the dollar, which Boyer said was overvalued because of high U.S. interest rates, had increased Spain's competitiveness in trade.

But the minister said the edge had to be maintained, now that the U.S. currency was dropping, in order to avert grave risk to Spanish exports and to the national balance-of-payments deficit.

An indicator of the pressure on the peseta came last week when provisional figures revealed that Spain's gold and foreign-currency reserves fell by $800 million in October, of which $700 million was spent on propping up the peseta.

The chief indicators of Spain's economic problems are a jobless rate of 16 percent, an inflation rate of 14 percent that is expected to be close to 16 percent at year's end and a public-sector deficit that represents 5 percent of gross national product.

Boyer indicated that an underlying reason for devaluation was the failure of previous administrations to combat inflation. The main opposition group, the conservative Popular Alliance Party, issued a statement saying the government's move was hasty and warned of spiraling inflation as a result.