MEXICO CITY, May 21 (Reuters) - Mexico's next government, which will be elected on June 2, is facing three main risks to its sovereign credit rating, including the possibility that larger fiscal deficits lead to higher public debt, Fitch Ratings told Reuters.

The other two main risks that could have "negative implications" for the credit rating are government policies that hurt Mexico's economic growth or the possibility of a deterioration of governance and the rule of law, the ratings agency said.

"If fiscal deficits remain consistent with an accelerated increase in public debt, that could affect Mexico's sovereign rating," said Carlos Morales, Fitch's primary rating analyst for Mexico.

Ruling party candidate Claudia Sheinbaum, a close ally of President Andres Manuel Lopez Obrador, holds a comfortable lead over her closest rival, a poll showed last week.

Lopez Obrador largely kept Mexico's public finances in order during his first five years in office as he pursued broad budget austerity policies, even during the heights of the pandemic.

But in 2024, his sixth and final year leading Latin America's second-largest economy, the government has estimated the fiscal deficit will rise to 5.9% of gross domestic product (GDP), as measured by public sector borrowing requirements, as his government looks to wrap up major infrastructure projects.

That deficit estimate is up from deficits of 4.3% of GDP in 2023 and 2022, a deficit of 3.8% in 2021, 4.3% in 2020 and 2.3% in 2019, according to the International Monetary Fund's (IMF) Fiscal Monitor report published in April. In fact, the projected 2024 deficit is by far the highest in the IMF's Mexico deficit records, which date back nine years.

"It's a step in the wrong direction. It's a fairly high deficit that may entail long-term risks ... if this continues over the next few years, during the next administration, that would definitely be a credit negative," Morales said.

However, Morales underscored that as construction and spending on Lopez Obrador's emblematic infrastructure projects such as the over-budget Olmeca refinery end, he expects the higher fiscal deficits to be transitory.

On the flip side, more robust economic growth, smaller fiscal deficits that lead to a reduction in public debt or improved governance and rule of law would be positive for the credit rating.

Mexico's future president will also have to contend with state energy company Pemex, which has for years been a concern for public finances as the world's most financially burdened energy company.

"Pemex's debt has been stabilizing, but to the detriment of the federal government's fiscal accounts," Morales said. "Our expectation is that the government support will continue in the next administration, regardless of who wins the election."

In December, Fitch affirmed Mexico's long-term foreign currency issuer default rating at 'BBB-', saying the rating outlook is stable. (Reporting by Anthony Esposito and Noe Torres; editing by Rod Nickel)