KYIV - Ukraine's central bank kept its main interest rate unchanged at a seven-year-high of 25% on Thursday and raised its 2022 inflation forecast to more than 30%.

Devastated by the war with Russia, Ukraine's economy fell by around 40% year on year in the second quarter of this year, the central bank said, opening up the possibility it could keep the key rate at 25% until the second quarter of 2024.

"The baseline scenario of the macroeconomic forecast envisages that the key policy rate will be maintained at 25% at least until Q2 2024," the National Bank of Ukraine (NBU) said in a statement.

Ukraine's economy could shrink by a third in 2022 before recovering next year, the central bank said. It is expected to grow between 5% and 6% in 2023 and 2024, it said.

The rate meeting was held hours after the central bank abruptly devalued the hryvnia, the national currency, by 25% against the U.S. dollar to help cope with the impact of the war.

NBU Governor Kyrylo Shevchenko told reporters the devaluation would add 2-3 percentage points to inflation, a projection it took into account for its new inflation forecast.

Another senior central official said conditions were not ripe for a return to a floating exchange rate for the hryvnia.

Shevchenko said that a new International Monetary Fund programme was expected next year.

The central bank said that Ukraine's cooperation with international partners would be a key factor in supporting the economy and contributing to its recovery.

A long war with Russia, which invaded on Feb. 24, was the key risk to its forecast, the central bank said.

(Reporting by Natalia Zinets; writing by Tom Balmforth, editing by Timothy Heritage)