MEXICO CITY, July 21 (Reuters) - Moody's Investors Service changed its outlook on Mexican state energy company Pemex's credit ratings to negative from stable as the heavily indebted company is likely to face increased credit risks, it said Friday.

Pemex has been unable to increase capital investments and improve its financial and operating performance as a result of liquidity constraints, Moody's added.

The company has received immense support from the government under President Andres Manuel Lopez Obrador, which Moody's said would likely continue in 2023 and 2024, when Lopez Obrador is set to leave office.

The next administration, however, would likely find it "increasingly burdensome" to continue the support, Moody's added.

A return to a stable outlook could come, Moody's said, if confidence were regained in Pemex's ability to carry out a strategy to improve financial and operating performance in the medium term.

Pemex issuing a "credible plan" on environmental, social and governance (ESG) strategy would also support it returning to a stable outlook, Moody's said.

It operates with fewer environmental restrictions to reach production goals, a Reuters investigation discovered. (Reporting by Kylie Madry in Mexico City Editing by Isabel Woodford and Matthew Lewis)