(Bloomberg) -- Hungary was cut to the lowest investment grade by Standard & Poor’s Global Ratings as Prime Minister Viktor Orban’s administration struggles to unlock billions of euros in European Union funding.

The ratings company lowered the country’s credit score by one step to BBB-, according to a statement late Friday. The outlook for Hungary is stable, S&P said.

“The downgrade follows a series of economic shocks to Hungary in the context of the Covid-19 pandemic and the Russia-Ukraine conflict, which have impaired the policy flexibility of fiscal and monetary authorities” S&P said in the statement. 

The EU last month froze about $30 billion earmarked for Hungary over rule of law and graft concerns, dashing hopes that the government would be able to tap the money in late 2022 to plug a budget shortfall. The country is also dealing with the fastest inflation in the EU and the bloc’s highest interest rate levels.

“We expect fiscal consolidation will be difficult given still-elevated energy costs, a rising interest bill, and a challenging economic outlook,” S&P said. “The stable outlook reflects our expectations that Hungary’s economy will avoid a substantial economic downturn over the next two years and weather the indirect effects of the Russia-Ukraine war, despite challenges to fiscal and monetary policy flexibility.”

S&P revised its outlook on Hungary to negative in August, warning of a downgrade over delays to the EU funds or a potential constraint of energy supply given the economy’s dependence on Russian oil and natural gas.

Orban locked the country into a 15-year natural gas contract with Gazprom PJSC in 2021, just as EU peers moved to wean themselves off of Russian energy, especially after President Vladimir Putin’s invasion of Ukraine last year.

Fitch Ratings, which like Moody’s Investors Service has Hungary at the second-lowest investment grade, cut Hungary’s outlook to negative from stable at the end of last week.

Despite the risks, Hungarian assets have rallied since the central bank pushed through an emergency rate hike in October. 

The yield on the 10-year local government bond has dropped more than 300 basis points since mid-October and the forint this week strengthened to an eight-month high against the euro. The central bank pledged on Tuesday to keep its “tight” monetary policy in place until a “trend-like improvement” in Hungary’s risk profile.

©2023 Bloomberg L.P.