Like doleful mariachi singers, Mexican leaders often lament that their country is "so far from God, so close to the United States." Mexican President-elect Enrique Peña Nieto doesn't take office until Dec. 1, but he already faces a cross-border conundrum. On Nov. 6, voters in the U.S. states of Colorado and Washington legalized marijuana  leaving Mexico, where 60,000 people have been killed in ghastly drug violence over the past six years, to ponder whether its cops should now scratch cannabis off their interdiction list and whether Mexico itself should just go ahead and make weed as legal as tequila. "Personally, I'm against legalization," Peña Nieto told TIME before he visited President Barack Obama at the White House on Nov. 27. "But without a doubt," Peña Nieto stressed, legalization in the U.S. "opens space for a rethinking of our policy, for a debate about the course of the drug war."

The shrewd flexibility of that remark  a recognition that Obama, like U.S. federal law, still opposes marijuana legalization, yet an awareness that the legalization movement gives Latin American governments more leverage to retool a failed drug-war strategy  reflects Peña Nieto's biggest political asset. His talent for dialogue and compromise helped lock up his first presidential victory three weeks before his actual inauguration, when he persuaded his centrist Institutional Revolutionary Party (PRI) to break partisan gridlock and ensure passage of a major labor-reform law. "It signals a new spirit of maturity among our political parties," says Peña Nieto, "more of an agreement-seeking attitude." Peña Nieto hopes he left some of that postpartisan mojo in Washington to help a newly emboldened Obama win deals important to Mexico, like immigration reform  whose chances, Peña Nieto acknowledges, are enhanced now thanks to the "great demand expressed by Hispanic voters" in the U.S. election. "I think we can start moving beyond what is sometimes a monothematic relationship due to the [drug war] issue," Peña Nieto adds. "We can start focusing on prosperity issues again," like Mexico's participation with the U.S. in Trans-Pacific Partnership trade talks.

At home, however, Peña Nieto faces challenges more daunting than legal pot and illegal immigration. What Mexicans want far more than easier entry into the U.S. is a faster exit from the hole of narco bloodshed and economic malaise that their nation finds itself in today, even as Mexico's leadership in Latin America is increasingly eclipsed by its fast-developing South American rival Brazil. Peña Nieto's sexenio (the sole six-year term Mexican Presidents are constitutionally limited to) marks a critical moment for the Mesoamerican giant, and not just because the 46-year-old President's youthful, pragmatic energy seems to offer Mexico a 21st century reboot. It also gives the PRI  which ruled Mexico from 1929 to 2000 as a one-party dictatorship  a chance to atone for the entrenched problems its notorious corruption helped spawn in the 20th century, from terrifying drug cartels to suffocating business monopolies to gaping economic inequality.

Peña Nieto, the former governor of central Mexico state, one of 32 states in the country, insists he never would have been elected in a democratic Mexico  he defeated his closet rival in July's presidential race by six points  if voters didn't believe the PRI had modernized too. In a wide-ranging TIME interview at his transition headquarters in Mexico City's well-heeled Lomas de Chapúltepec district, Peña Nieto dismissed critics like presidential runner-up Andrés Manuel López Obrador of the leftist Democratic Revolution Party (PRD), who warns that the PRI's mediagenic new face is just a pawn of the PRI's "old mafia." Peña Nieto points to his historic proposal to allow private investment in Mexico's large but inefficient state-run oil industry as evidence that he represents a rehabbed PRI and not the hypernationalist party of the past. "In Mexico today you have to compete," says Peña Nieto. "The big challenge now for me and my party is to produce results. If we don't, we can't compete."

The stakes are high. Peña Nieto knows Mexico's criminal crisis  including the recent arrests of 15 federal policemen, allegedly in the pay of drug traffickers, for ambushing and wounding two U.S. intelligence operatives and a Mexican naval officer  and its lackluster economic growth are linked "like a vicious cycle." If Peña Nieto's generation has indeed reformed the PRI  and that's not certain yet  then the country stands a decent chance of fixing the security dystopia and socioeconomic dysfunction that keep almost half of Mexico's 112 million people in poverty and force so many to search for work in the U.S. or with the cartels. But if Peña Nieto and the PRI fail, he admits, Mexico moves closer to becoming "a democracy of disenchantment." And, notes Eduardo García, founding editor of the financial-news website Sentido Común (Common Sense), "the U.S. can expect to start taking in many more Mexican migrants again."