MEXICO CITY (Reuters) - At the height of the COVID-19 pandemic, Mexico City's then-Mayor Claudia Sheinbaum made a point of always donning a face mask and firmly recommending others also do so as the virus devastated Mexico.

By contrast, her political patron President Andres Manuel Lopez Obrador refused to wear a mask, even after he fell ill, in line with his government's guidelines that did not mandate mask use. Mexico suffered the fifth-worst COVID-19 death toll in the world.

That difference between the president and Sheinbaum, the firm favorite to win the Mexican presidential elections on June 2, was seen by some as a point of tension and a small act of rebellion against her mentor, who cannot run for re-election by law. Sheinbaum denied it, saying the two were part of the same "project" to transform the country.

But people close to Sheinbaum cite this anecdote as an example of how the former scientist will not govern as a "puppet" of Lopez Obrador, as her political opponents claim.

Instead, they say, she will veer away on key issue such as the environment and energy, security and even corruption, while maintaining the president's principally state-led economic vision and key welfare programs.

"They have a collaborative relationship, it is not one of submission," said one member of Sheinbaum's team, who spoke on condition of anonymity.

"It's very unfair that they say she will be a puppet because in the five years of governing Mexico City she did totally different things to the president," he added, citing investments in electric bus and train routes and the installation of solar panels.

Sheinbaum has run a cautious campaign, careful not to criticize Lopez Obrador, an outsized, polarizing figure who is both her mentor and the source of much of her electoral support.

A lack of detail around her government plans has also served her well with Mexico's middle class and business community who have tended to project onto her hopes for a more moderate and pragmatic leader.

To what degree she will deviate from policies of Lopez Obrador is one of the key questions going into the elections, closely watched by investors after Lopez Obrador largely shut out private companies from key parts of the economy, such as power generation.

BALANCING ACT

Analysts say Sheinbaum faces a delicate balancing act between her own policy goals and maintaining the legacy of Lopez Obrador who wields considerable influence in the ruling MORENA party.

"If she wins she will have an internal struggle between her genuine loyalty to Lopez Obrador and her reality of not having her own political capital because she does not have his strength," said Agustin Basave, politician, academic and former congressman, who recently chaired the leftist Party of the Democratic Revolution.

"The first years of her government could be limited," Basave added, saying that Lopez Obrador will likely exert influence behind the scenes rather than publicly.

In a clue about Lopez Obrador's continuing influence, Sheinbaum has indicated that several of his high-ranking officials will remain in their posts if she takes over, including Finance Minister Rogelio Ramírez de la O.

Two sources close to Sheinbaum's camp say Lopez Obrador's former foreign minister, Marcelo Ebrard, as well as current Security Secretary Rosa Rodriguez are likely to remain key players. Analysts point to Interior Minister Luisa Alcalde and Economy Secretary Raquel Buenrrostro as also remaining important.

Another hint at Lopez Obrador's expectations for Sheinbaum's administration, analysts say, is the package of ambitious constitutional reforms he proposed in February knowing they had almost no chance of passing during his term. They were a blueprint for her administration, analysts say.

Sheinbaum, meanwhile, has ruled out speculation there would be a "red telephone" to receive instructions from Lopez Obrador.

"I am the one who is going to govern," she said.

(Reporting by Ana Isabel Martinez, additional reporting by Diego Ore, writing by Drazen Jorgic, editing by Stephen Eisenhammer and Alistair Bell)

By Ana Isabel Martinez