Jose Antonio Meade might be remembered as the best president Mexico never had.
The former finance minister turned presidential candidate is known for his competence, intelligence and character, but appears to have next to no chance of winning the election Sunday.
The problem? He is running for the deeply unpopular ruling party, the Institutional Revolutionary Party (PRI), which has been mired in a seemingly never-ending series of corruption scandals.
A respected technocrat, Meade, 49, has held a series of ministerial posts in the administrations of not only current President Enrique Pena Nieto, but also former presidents Felipe Calderon and Vicente Fox of the National Action Party (PAN).
This is the first time he is running for elected office.
Even many Mexicans who don't plan to vote for him say he is highly qualified for the job.
But he is carrying the very heavy baggage of the outgoing administration, and lacks the natural charisma that might have made it lighter.
Ironically, Meade is not actually a member of the troubled ruling party he is running for, and could hardly be more different from Pena Nieto.
Where the outgoing president is suave and scripted, with handsome looks and a soap-opera star wife to match, Meade is running as a regular guy who just happens to be a devoted and brilliant public servant.
He drives his own Honda, eats Mexican "torta" sandwiches, and was known for regularly dropping by the cafeteria at his ministry.
Smart and experienced, he laces his policy discussions with detailed statistics and history.
"He was a brilliant student," newspaper columnist Fausto Pretelin, a university classmate, told AFP.
"His intelligence was in a whole other dimension."
A Mexico City native, Meade grew up a Catholic family with Irish and Lebanese roots, in a household where politics and art intertwined.
His grandfather was a sculptor, and his father held various government posts.
He studied law at the National Autonomous University of Mexico (UNAM) and economics at the Autonomous Technological Institute of Mexico (ITAM), working on the two degrees simultaneously.
At ITAM he met his future wife, a fellow student named Juana Cuevas, an artist with whom he has three children.
He went to work for the government after Fox came to power in 2000, first heading a farm loans program, then a series of ministries: energy, foreign relations, social development and finance.
A born technocrat, he has struggled to connect with voters on a personal level.
He tends to speak in paragraphs rather than soundbites, and appeared stilted in debates despite being obviously well prepared.
Off camera, "Pepe" -- his nickname -- is far more relaxed, cracking jokes, giving back slaps and slinging Mexican slang.
Perhaps trying to distance himself from the telegenic Pena Nieto, he has made self-deprecating jokes about the small blotches on his face caused by the medical condition vitiligo, as well as his slight paunch -- though in one ad he proudly revealed he had lost eight kilos (more than 17 pounds) on the campaign trail.
A year ago Meade was nowhere near the top of the list of likely PRI presidential candidates.
But facing dismal approval ratings, the party decided to allow non-members to stand as candidates, hoping that would help it woo back alienated voters.
Meade's job was to "wash the PRI's dirtied face," the opinion columnist Martha Anaya told AFP.
If the opinion polls are correct, the plan failed.
Meade is running in third place and looks likely to be trounced by the leftist front-runner, Andres Manuel Lopez Obrador.