* Majority of rating actions now going in positive direction

* Impact of COVID, Ukraine war and rate spike waning

* However, average EM fiscal deficit seen on the rise

LONDON, May 22 (Reuters) - From Brazil, Nigeria and Turkey to even some of the riskiest emerging markets such as Egypt and Zambia, evidence is growing that a decade-long deterioration in sovereign credit ratings has finally started to reverse.

Economists watch ratings because they influence a country's borrowing costs and many are now highlighting a turnaround that seems incongruous with the usual warnings about rising debt pressures.

According to Bank of America, almost three-quarters of all sovereign rating moves by S&P, Moody's and Fitch this year have been in a positive direction, compared with the almost 100% that went the other way in the first year of the COVID pandemic.

With that and the spike in global interest rates now in the rear view mirror, more good news should be coming too.

Moody’s now has 15 developing economies on a positive outlook - rating firm parlance for an upgrade watch - one of its highest numbers ever. S&P has 17, while Fitch has seven more positive than negative outlooks, its best ratio since a post-global financial crisis rebound in ratings in 2011.

Fitch's global head of sovereign research Ed Parker said the turnaround has been down to a combination of factors.

For some countries it has been a general recovery from COVID and/or the energy price spikes caused by the Ukraine war. Others are seeing country-specific improvements in policymaking, while a core group of junk-rated "frontier" nations are now benefiting from suddenly being able to access debt markets again, he said.

Aviva Investors' head of EM hard currency debt, Aaron Grehan, describes the current upgrade wave as a "definitive shift" that has also coincided with a sharp drop in the premiums that emerging markets almost everywhere have had to pay to borrow.

"Since 2020, well over 60% of all rating actions have been negative. In 2024, 70% have been positive," Grehan said, adding that Aviva's internal scoring models were similar.

DECADE OF DOWNGRADES

The awkward reality though is that the current run of upgrades will not make up for the last 10-15 years.

Turkey, South Africa, Brazil and Russia all lost coveted investment grade scores during that time, while a deluge of debt almost everywhere apart from the Gulf has left the average EM credit rating more than a notch lower than it used to be.

And though some countries argue that developed economies where debt is still surging are being treated more leniently by the rating firms, EM finances are hardly sparkling now.

Eldar Vakitov, a sovereign analyst and "bond vigilante" at M&G Investments points to the International Monetary Fund's recent forecast that the average EM fiscal deficit will edge up to 5.5% of GDP this year.

Just a year ago, the assumption was that the 2023 EM fiscal expansion was a one-off that would be fully reversed this year. Now the EM fiscal deficit is expected to remain above 5% of GDP until the end of the Fund’s forecast horizon in 2029.

So why all the rating upgrades?

"For some countries it is all about the starting point," Vakitov said, explaining that even though government deficits were still wide, they had at least dropped down from peak COVID levels.

A few governments, such as Zambia, are getting a natural lift from coming out of debt restructurings while a number of places are making obvious policy improvements.

Turkey, which has already had a couple of upgrades for attacking its inflation problem head on, and Egypt which seems to have shaken off default worries, are both expected to see multi-notch upgrades now, according to market pricing.

"Rating agencies tend to be slow though," Vakitov said, "so it often takes them a lot of time to give upgrades."

COUPON PAYMENTS

The downgrades have not stopped completely. Moody's and Fitch have both put China on a warning over the last six months, Israel's war has led to its first ever downgrades and Panama has been stripped of one of its investment grades.

Three years on from COVID spending splurges and the bills are having to be paid too. EM hard currency debt amortisations and coupon payments are expected to reach an all-time high of $134 billion this year, JP Morgan estimates.

That is up by $32 billion from last year, so it is not surprising then that emerging market policymakers are eager to do all they can to get their ratings up and keep borrowing costs down.

Indonesia's Finance Minister Sri Mulyani Indrawati explained in London this month how the agencies had doubted her when she told them during COVID that Indonesia would get its deficit back below 3% of GDP within 3 years.

"It ended up that we were able to consolidate the fiscal (position) in only two years," she said. "So I always like to say to my rating agency staff, I won the bet, so you have to upgrade my rating!"

(Reporting by Marc Jones; Editing by Alison Williams)