(Bloomberg) -- Hungary’s outlook was revised to negative from stable by Standard & Poor’s Global Ratings as the nation tackles the fallout from the war in neighboring Ukraine and the government wrangles with the European Union over billions of euros in funding. 

The country’s credit grade was maintained at BBB, the second-lowest investment grade, S&P said in a statement late Friday. That matches the level at Moody’s Investors Service and Fitch Ratings.

“External risks, including potential cuts to EU funds and reduced gas flows, could weigh on Hungary’s growth prospects and endanger post-pandemic fiscal consolidation,” S&P said. “Rising wage and price inflation, a volatile exchange rate, and upward pressure on borrowing costs could also narrow the government’s policy flexibility.”

Russia’s invasion of Ukraine fanned investor concern about Hungary, which is highly dependent on Moscow for its energy supplies. A temporary halt in Russian oil flows to central Europe this week triggered a drop in the currency, which has been the third-worst performing in emerging markets since the outbreak of the war.

Adding to challenges are fiscal concerns after pre-election spending had already run up twin deficits, while relatively high government debt is paired with modest foreign currency reserves. 

The forint has dropped more than 8% against the euro since Russia’s war in Ukraine started in February, with the turmoil prompting the central bank to raise its key interest rate to the highest level in the EU.

Prime Minister Viktor Orban has also failed to clinch an agreement with the EU’s executive on crucial funding, though efforts to reach a compromise on graft and rule of law concerns have helped the forint to recover some of its losses since February.

©2022 Bloomberg L.P.