BERLIN, Nov 15 (Reuters) - Germany's constitutional court is to rule on Wednesday on the legality of the coalition government's 2021 decision to re-allocate 60 billion euros ($64 billion) of unused debt from the pandemic era to its climate and transformation fund.

This will be a key ruling as it may set a precedent for Germany's fiscal responses in future crises, while it could also trigger tensions in the coalition in a key week for budget negotiations.

The budget manoeuvre agreed in December 2021 by the centre-left Social Democrats (SPD), pro-spending Greens and fiscally cautious Free Democrats (FDP) in their coalition deal, allowed the parties to make the most of a temporary, pandemic-related suspension of borrowing limits in the constitution.

In addition, the government changed the accounting principal by which borrowing counted against the budget deficit in the year the borrowing was actually done. Therefore, the 60 billion euros transfer counted only as a deficit in 2021, but not in the years 2023 and 2024 when most of the spending was supposed to occur.

This enabled Germany's finance minister Christian Lindner to return to the debt brake rule this year. The rule restricts the German public deficit to 0.35% of GDP but was suspended due to the pandemic from 2020 to 2022.

In response to the coalition government's move, the opposition sued at the constitutional court, claiming the law circumvented the debt brake.

"If the coalition were to be allowed to continue with this practice, every finance minister could in the future accumulate unlimited debt in a crisis year, but then use the money later for completely different purposes and for an unlimited period of time in other years," said Mathias Middelberg, of the CDU/CSU parliamentary group.

"Germany’s constitutional court could provide a landmark ruling affecting the government’s fiscal space immediately and in future crises," Citi's economist Christian Schulz said.

A ruling against the government would mean it needs to find money for the climate fund elsewhere, which would be challenging in the current tight budget environment and amid discord in the coalition.

Germany's 2024 budget and financial plans through 2027 are to be finalised on Friday, as Europe's biggest economic power curbs spending that surged in response to COVID-19 and the Ukraine war.

The ruling of the constitutional court could put additional pressure on budget deliberations.

"The government may have to cut its deficit spending plans by 40 billion euros for 2024, equivalent to 1% of annual GDP, and by a lower amount for the following years," said Berenberg's economist Salomon Fiedler.

However, even if the court decides against the government, it is likely that the required budget adjustments would be significantly smaller than that, he noted.

"The court may allow the government some time to bring its deficit back in line with the debt brake," Fiedler said. ($1 = 0.9357 euros) (Reporting by Maria Martinez; Additional reporting by Christian Kraemer; Editing by Susan Fenton)