Mexico City mayor-elect Miguel Angel Mancera of the Democratic Revolution Party, or PRD, waves to supporters during a campaign rally in June. (Marco Ugarte/AP)

As accusations of fraud swirl around the presidential race, there is one Mexican election that is undisputed: the victory of Miguel Angel Mancera, the capital city’s mayor-elect.

The soft-spoken legal scholar, who until recently was the city’s top prosecutor, won with 63 percent of the vote.

Mancera was the candidate of the Democratic Revolutionary Party, or PRD, which has run Mexico City since 1997 and is credited with transforming the colossal capital from urban dystopia to tourist destination.

It was a remarkable political debut, but it was viewed mostly as a show of the Mexican left’s strength.

“The left could have picked a name randomly from the phone book and won the mayorship,” said George Grayson, a professor at the College of William and Mary.

Under PRD governance, air pollution has been reduced by half. The public pedals city bicycles, which share the streets with low-emission buses and experimental hybrid electric public vehicles in the Federal District, or D.F., an entity similar to the District of Columbia.

Attention to quality of life has brought concerts by Paul McCartney and Justin Bieber in the downtown Zocalo square; one of the world’s largest ice-skating rinks; and free Viagra. The elderly and single mothers receive pensions, and there is free medical care for the uninsured.

The PRD-dominated city assembly has legalized gay marriage, no-fault divorce, abortion and, in some cases, euthanasia, priding itself on being in the vanguard of social tolerance in a conservative Roman Catholic country.

“Ours is a city of liberties, a city of consolidation of rights,” Mancera said in an interview at his campaign headquarters, in a modest office building in a leafy neighborhood in the south of the city. “It is a city that fights against gender discrimination and for the protection of women. Here is where the decriminalization of abortion was first discussed, where same-sex marriage is permitted.”

“It is a city that opens paths of modernity that make their way to other cities,” he said. “It is a jumping-off point.”

In a country convulsed by the drug war, Mexico City is also an island of relative safety. As murder, kidnapping and robbery rose in the rest of Mexico, Mancera campaigned on a 12 percent reported decline in crime here between 2010 and 2011, while he was the city’s attorney general.

Mexico City analyst Ana Maria Salazar said Mancera is perceived as a charismatic, highly intelligent “un-politician” who quietly rose with popular outgoing Mayor Marcelo Ebrard by helping to solve the security problem.

“In six years, Ebrard was able to convert Mexico City from being known as one of the most dangerous capitals of the world to one of the most innovative and progressive. You could not change the image of Mexico City until you dealt with the security issue,” said Salazar, who is also a television and radio anchor. “That’s where Miguel Angel Mancera came in. He was a fundamental part of Marcelo Ebrard’s success as a mayor.”

Looming challenges

The PRD’s most significant task is achieving environmental sustainability in one of the world’s biggest cities.

An estimated 22 million people inhabit the Mexico City megalopolis — nearly 20 percent of the country’s population — with 9 million of them in the Federal District.

It was named the most contaminated urban area in the world in 1992, a place Mexican writer Carlos Fuentes called “Makesicko City.” Now it’s probably not even in the top 10 most polluted, according to experts at the World Bank.

But keeping up with growth is a huge challenge in a city that generates 9,000 tons of garbage a day and where 2 million cars have doubled to 4 million since 1995.

Mancera will oversee the city’s Green Plan, a vision for enhancing habitability that includes a nascent recycling effort and a project to harvest methane energy from a 79 million-ton garbage dump that could eventually provide electrical power to 35,000 households.

Mancera’s years as a public prosecutor have left him familiar with the law enforcement challenges the city faces.

He said drug cartels are unable to get a foothold in the capital because they lack the consolidated networks of corruption they need to protect their convoys and operations.

Some security experts, however, suggest that the cartel leaders — and their families, accountants and money launderers — are in Mexico City but that they choose not to fight here, to avoid attracting scrutiny.

Mancera said it helps that the more than 80,000 police officers answer to a single command with a center of operation, unlike the fragmented patchwork of municipal and police forces in the rest of Mexico.

‘A little country of its own’

Mancera’s victory is also seen as a demonstration of the weakness of his rivals, among them Beatriz Paredes, a former president of the Institutional Revolutionary Party (PRI), which ran Mexico as a one-party state for more than 70 years before it was voted out of power in 2000.

In the presidential race, Mexicans chose the PRI’s Enrique Peña Nieto, although the PRD candidate, Andres Manuel Lopez Obrador, who came in second, claims the vote was clouded by fraud.

If Mexico City has become a bit of a left-leaning city-state, it is not without problems, such as the petty bribes demanded for city services and permits, the vast system of political patronage and favors, or the crooked police arrested for involvement in notorious kidnapping rings.

Yet when he served as mayor of Mexico City, Lopez Obrador reportedly reached an 84 percent approval rating, and some analysts speculate that if Ebrard, the mayor, had been the PRD presidential candidate, the party might have beaten Peña Nieto.

Raised by a working mother, Mancera attended Mexico City public schools, earning his law degree at Mexico’s Autonomous National University, or UNAM. He earned a master’s of law degree at the University of Barcelona and a doctorate at UNAM.

He is a twice-divorced father of three. Speculation over his love life spilled into a recent column of the online Animal Politico news Web site, which asked, “Who is Miguel Angel Mancera dating?”

Columnist Beto Tavira called him “the George Clooney of Tenochtitlan” — the Aztec name for the pre-Columbian city when the Spanish conquistadors arrived.

The Mancera landslide “is a very big victory for the left,” said Mexican writer Elena Poniatowska, who campaigned for Lopez Obrador.

“The left has done very well in the Federal District,” she said. “It’s like a little country of its own.”