LONDON - British public debt rose last month to its highest as a share of the economy since 1961, data showed on Friday, adding to the financial challenges the next government will face as soon as it comes to power after a general election in two weeks' time.

Public sector net debt, excluding state-controlled banks, reached 2.742 trillion pounds ($3.47 trillion) or 99.8% of annual gross domestic product in May, up from 96.1% a year earlier, the Office for National Statistics said.

The increase came despite slightly lower-than-expected government borrowing in May, which stood at 15.0 billion pounds compared with economists' median forecast of 15.7 billion pounds in a Reuters poll.

Britain looks headed for a change of government following an election on July 4, as Keir Starmer's Labour Party is far ahead of Prime Minister Rishi Sunak's Conservatives in the polls.

Public debt soared in Britain during the COVID-19 pandemic, and the public finances have also been hit by slow growth and a rise in the Bank of England's interest rates to a 16-year high.

Most other Western countries saw big increases in debt over the same period, and British debt levels are below those in the United States, France and Italy.

Borrowing in Britain totalled 33.5 billion pounds in the first two months of the financial year, 0.4 billion more than the same period in 2023, but 1.5 billion pounds less than government budget forecasts had predicted in March.

Consultants at Capital Economics said these lower-than-expected borrowing numbers reflected less public investment, and would offer scant comfort to Britain's next finance minister.

"They do little to reduce the scale of the fiscal challenge that awaits them, in part because of the upward pressure on the debt interest bill from higher interest rates," said Alex Kerr, assistant economist at Capital Economics.

Labour and the Conservatives intend to stick with existing budget rules which require official forecasts - last updated in March - to show that debt as a share of GDP is falling in the fifth year of the forecast.

Higher interest rates than were forecast in March's budget meant Britain's next chancellor now had just 8.5 billion pounds of leeway to meet these rules, down from the historically low 8.9 billion in March, Kerr said.

Both Labour and the Conservatives have pledged not to raise the rate of income tax, value-added tax or other major levies, but government budget forecasts in March showed tax as a share of GDP was on track to reach its highest since 1948.

($1 = 0.7897 pounds)

(Reporting by David Milliken; editing by Sarah Young and Shinjini Ganguli)