The United States tried and failed, and now Mexico is trying to get there first.
In historic elections on Sunday, Mexican voters are expected to elect a woman, possibly a Jewish woman, to lead the country, ahead of neighbor and sometime rival the United States.
With Claudia Scheinbaum expected to win and become the next chief negotiator with the US on issues ranging from cross-border trade to immigration to drug and fentanyl trafficking, the impact will inevitably ripple into American homes.
Here's what you need to know about Mexico's election day and the woman who's likely to win.
Mexico's president is likely to be a woman
The presidential election is a three-way race, but the leading candidate is Claudia Sheinbaum, a scientist, engineer and former Mexico City mayor who shares the same populist ideology as political leader and current President Andrés Manuel López Obrador.
Prepare to vote: See who's running for president and compare their positions on key issues with our Voter Guide
Xochitl Gálvez, a businesswoman and former senator, is in second place in the polls, almost certain to see Mexico elect a female head of state before the U.S. Jorge Álvarez Maínez is the third candidate.
“A lot of what happens in Mexico has implications not just for Mexico, but for the United States,” said Shannon O'Neill, a senior fellow at the Council on Foreign Relations. “Who the next president of Mexico is really important.”
While political rhetoric north of the border may leave some Americans thinking of Mexico as stereotypes or caricatures of former President Donald Trump's “bad guys” or spring breakers, Mexico's influence on the U.S. is ubiquitous.
Mexican oil is used in the Mexican-made auto parts that support jobs for American auto workers in Detroit, the windmill blades exported to America's clean energy plants, the pacemakers that save the lives of American patients with heart failure, and even the $15 avocado toast on restaurant menus across the country.
China became America's largest trading partner last year, pushing it into second place, and trade between the two neighbors now reaches about $800 billion a year, according to the U.S. Census Bureau.
But it's a difficult relationship: Mexico is also a transit country for hundreds of thousands of migrants heading to the United States, frequently causing humanitarian crises at the U.S. border, and is a major source of fentanyl, which kills tens of thousands of Americans each year.
“If you have a president who is open to the United States, who is willing to work with us on common challenges and who is willing to multiply our opportunities, that's a good thing for the United States,” O'Neill said. “If you have a president who is more skeptical and doesn't want to work with us, it's a lot harder.”
Front-runner Claudia Scheinbaum denounces racism and “machismo”
Sheinbaum, who leads by double digits in the polls, is seen as more of a left-wing idealist than a shrewd negotiator like Lopez Obrador, but she has pledged to continue Lopez Obrador's policies.
Speaking at a campaign rally outside Mexico's colonial palace on Wednesday, Sheinbaum, 61, praised Lopez Obrador as “the best president Mexico has ever had,” blasted “neoliberalism” and promised to continue Lopez Obrador's policies to eradicate inequality.
O'Neill said those measures would include cash transfers to about 25 million Mexicans, including seniors and students.
“Humanism is about taking back rights and eradicating classism, racism, machismo and discrimination — all of these things that belong to the right,” Scheinbaum said.
Under Lopez Obrador's administration, U.S.-Mexico cooperation deteriorated in some areas but remained strong in others., Experts expect similar results to continue if Scheinbaum wins.
Lopez Obrador has scaled back security cooperation and withdrawn from a pact known as the Mérida Initiative, in which the U.S. committed $1.5 billion in aid to fight Mexican criminal organizations, but he has renegotiated a key U.S.-Canada-Mexico free trade agreement and continued to work with the U.S. on reducing migration to the U.S. border, one of his current top priorities.
Mexican voters concerned about economy, public safety
But the issues that matter most to the United States — trade, immigration, border security, drug trafficking — are not the issues Mexicans care about most.
From the industrial north to the Caribbean coast to the vital capital of 22 million people, Mexican voters are concerned about inflation, economic opportunity and security in their communities.
The election is the largest in Mexico's history, with 20,708 posts up for grabs, according to the National Electoral Commission. Campaigning across Mexico has been marked by violence, with a mayoral candidate in the southern state of Guerrero shot dead on Wednesday.
“Whoever wins will be addressing major security issues,” said Jennifer Aperti, director of the Texas-Mexico Center at Southern Methodist University.
In Mexico, she said, the next administration's focus will likely be on domestic policy, not foreign policy: “Two of the biggest challenges at home are what to do about crime and jobs.”
Corrupt Mexican officials and an insatiable U.S. demand for drugs have allowed criminal gangs to thrive in many parts of Mexico. They have accumulated so much power that they control not only the drug trade but also legitimate export industries such as avocados and limes. Mexicans live under the dark shadow of extreme violence as rival gangs fight over territory.
Mr Galvez, the second-placed candidate in the polls, is trying to tap into that discontent, saying at his final campaign rally in the northern city of Monterrey that “136,000 people have been killed and 50,000 disappeared” in Mexico during Mr Lopez Obrador's six years in office.
“This is the result of a security strategy of 'hugs' for criminals and 'bullets' for the people,” she said, referring to President Andres Manuel Lopez Obrador's trademark “hugs, not bullets” strategy of not tackling criminal organizations head-on.
Faced with the reality of violence and sluggish economic growth in Mexico, more than a third of Mexican respondents to a recent poll by the El Paso, Texas-based Puente Collaborative said they would consider moving to the United States for better working and living conditions.
The Path to Prosperity in U.S.-Mexico Relations
But more often, Mexicans are staying put, finding work in the hundreds of assembly plants that send auto parts, pacemakers, ventilators, computers and Christmas lights to the United States, or working in the busy tourist ports from Puerto Vallarta to Cancun.
Mexico is seeing hundreds of thousands of migrants travelling north to the U.S. border, increasingly from other parts of the country.
Lorenzo Pacheco held up a sign for Sheinbaum in Mexico City's giant Zocalo square on Wednesday. Pacheco said he has never worked in the United States, but he recently took a four-day trip to Las Vegas to visit its casinos as the peso strengthened against the dollar.
Wearing the maroon uniform of Scheinbaum's MORENA party, he said he would vote for her on Sunday. But even a radical “Morenista” like him said the government was not doing enough to fight organized crime.
“This is something that the current administration needs to address more rigorously,” he said, “because they're not actually solving the problem.”
Like many Mexicans, Mr. Pacheco sees Mexico's path to prosperity in relations with the U.S. The Puente poll found that 42% of Mexicans view current relations with the U.S. favorably, and 60% have a favorable opinion of Americans.
“The United States depends on Mexico, but Mexico depends on the United States,” Pacheco said. “We need to be more open in trade, in tourism, in all the areas that benefit both countries. When one grows, the other grows.”
Omar Ornelas reported from Mexico City.