Ratings agency Moody's has upgraded Qatar's credit outlook to positive from stable, citing higher energy prices expected to bring significant budget surpluses that will help the Gulf state to manage its medium-term debt profile.

Qatar, which hosts the 2022 FIFA World Cup this month, is one of the world's largest exporters of natural gas and has benefited from huge windfalls from soaring global oil and gas prices.

"The change of outlook to positive reflects the prospect that the improvement in Qatar's debt metrics, observed in 2021-22 as a result of elevated energy prices, can be sustained in the medium term even if oil and natural gas prices moderate over the next few years," Moody's said.

High energy prices have so far translated into a budget surplus of almost 50 billion Qatari riyals ($13.7 billion), the Emir Sheikh Tamim bin Hamad al-Thani said last month.

Moody's estimates Qatar's fiscal surplus will be about 9.5% of GDP this year and that some of that has been used already to reduce government debt estimated to have reached 42% of GDP by the end of September.

The figure could drop below 40% of GDP by the end of 2023, the agency said.

"Significant spending reduction and higher hydrocarbon output over the next five years would make government finances more resilient to potential future declines in oil prices and ... has the potential to fully offset the negative fiscal impact of moderating energy prices toward the end of the decade," Moody's said.

The agency also affirmed Qatar's rating at Aa3. ($1 = 3.6415 Qatar riyals) (Reporting by Rachna Uppal Editing by David Goodman)