LISBON, May 1 (Reuters) - Portugal swung to an unexpected budget deficit of 259 million euros ($276 million) in the first quarter from a surplus of 5.1 billion euros a year ago, the finance ministry said, blaming the previous government for last minute measures that worsened accounts.

It said in a statement late on Tuesday that overall revenue fell 7.4% to 25.1 billion euros, with tax revenue falling 0.3%, while public spending rose 15% to more than 25.3 billion euros.

Portugal had a surplus of 1.2 billion euros in January, which was reduced to 785 million euros at the end of February, but has not had a budget deficit since the end of 2022.

A coalition led by the centre-right Social Democratic Party won the March 10 general election, beating the Socialist Party by a slim margin.

"This strong degradation of the budget balance ... results, to a large extent, from decisions and commitments made this year by the previous government and, in many cases, after the March 10 election," the ministry said, without providing details.

The government has said it wants to distribute any budget surplus among the Portuguese and promised tax cuts for the middle class, young people and companies to boost the economy and maintain balanced budgets.

The General Directorate of Budget at the finance ministry said expenditure on pensions increased 16%, civil servant wages increased 7.8% and the purchase of goods and services rose 7.2%.

It also said there were new measures to mitigate the impacts of "geopolitical shocks" and inflation, boosting spending.

The government has predicted a budget surplus of 0.3% of GDP this year after a surplus of 1.2% in 2023, basing its projections on unchanged policies compared to those of the Socialists and without including its own measures.

($1 = 0.9366 euros) (Reporting by Sergio Goncalves; Editing by Catarina Demony and Mark Potter)