MEXICO CITY (Reuters) - Former Mexico City Mayor and ruling party candidate Claudia Sheinbaum held a comfortable, albeit slightly narrower lead over her closest rival ahead of the nation's elections less than three weeks away, a poll showed on Tuesday.

Sheinbaum, a close ally of President Andres Manuel Lopez Obrador running under his leftist National Regeneration Movement (MORENA) party's ticket, holds nearly 49% of the vote, the poll by consulting firm Mitofsky for newspaper El Economista showed.

Rival Xochitl Galvez, who represents the diverse coalition of opposition parties of the center-right National Action Party (PAN), the centrist Institutional Revolutionary Party (PRI) and the center-left Democratic Revolution (PRD), trails her with about 28% of the vote.

Mitofsky's April poll had shown Sheinbaum with 51.4% of the vote versus Galvez's 26.7%.

Meanwhile candidate Jorge Alvarez Maynez of the center-left Citizens' Movement (MC) gained some ground in the past month, from 9.3% to 10.3%.

Another 12.7% said in the May poll that they either would not vote or they had not yet decided ahead of the June 2 election.

The Mitofsky poll was conducted among 1,600 adults between May 3 and 6 and has a margin of error of plus or minus 2.5%.

(Reporting by Diego Ore; Writing by Kylie Madry; Editing by Josie Kao)