Four tons of cocaine confiscated by U.S. authorities off the California coast; 35 bodies dumped by the side of a busy Veracruz highway in broad daylight; an attack by gunmen on a birthday party in Ciudad Juárez killing 14, many of them teenagers: tragedies like these, all of which occurred over the past two years and were extensively covered by the media, are common in Mexico today. Prominent Mexican news organizations and analysts have estimated that during the six-year term of Mexico's last president, Felipe Calderón, over 60,000 people were killed in drug-related violence, and some researchers have put the number at tens of thousands more. Mexico's crime rates are some of the worst in the Western Hemisphere. According to Latinobarómetro, an annual regionwide public opinion poll, over 40 percent of Mexicans say that they or a family member has been the victim of a crime at some point in the last year.

Hidden behind the troubling headlines, however, is another, more hopeful Mexico -- one undergoing rapid and widespread social, political, and economic transformation. Yes, Mexico continues to struggle with grave security threats, but it is also fostering a globally competitive marketplace, a growing middle class, and an increasingly influential pro-democracy voter base. In addition, Mexico's ties with the United States are changing. Common interests in energy, manufacturing, and security, as well as an overlapping community formed by millions of binational families, have made Mexico's path forward increasingly important to its northern neighbor.

For most of the past century, U.S.-Mexican relations were conducted at arm's length. That began to change, however, in the 1980s and, even more, after the 1994 North American Free Trade Agreement (NAFTA) spurred greater bilateral economic engagement and cooperation. Mexico's democratic transition has further eased the wariness of some skeptics in Washington. Still, the U.S.-Mexican relationship is far from perfect. New bilateral policies are required, especially to facilitate the movement of people and goods across the U.S.-Mexican border. More important, the United States needs to start seeing Mexico as a partner instead of a problem.

ECONOMIC REVOLUTION

Three decades ago, Mexico had an inward-looking, oil-dominated economy. The Institutional Revolutionary Party (PRI), which ruled the country for 71 years, maintained a stranglehold on the economy and the country as a whole. PRI presidents championed domestic industries with high tariffs, generous domestic subsidies, and export and production quotas. These policies limited trade, with primarily machinery, chemicals, and metals coming in, and oil, which accounted for three out of every four dollars of Mexico's exports, going out. State-owned enterprises controlled economic sectors as diverse as telecommunications, sugar, airlines, hotels, steel, and textiles. These state-sponsored monopolies provided employment for almost one million Mexicans, as well as patronage to party officials and union leaders. But they also weighed down the economy with overpriced goods, inefficient policies, and corruption, triggering repeated booms and busts.

Today, Mexico has shaken off this volatile past to become one of the most open and globalized economies in the world. It maintains free-trade agreements with over 40 countries. The country's trade as a percentage of GDP -- a useful measure of economic openness -- is 65 percent, compared with 59 percent in China, 32 percent in the United States, and 25 percent in Brazil. No longer addicted to oil, Mexico's export economy is now driven by manufacturing, especially of cars, computers, and appliances. The shift from commodities and agriculture to services and manufacturing has catapulted the country forward, and Mexico is outpacing many other emerging-market countries, including China, India, and Russia, in making this economic transition.

These fundamental changes began in 1982, at the onset of the Latin American debt crisis. Hit by rising interest rates and declining oil prices, the Mexican government stopped payment on some $80 billion in foreign obligations, mostly to U.S. commercial banks. The ensuing financial crisis further crippled the economy and cost millions their livelihoods, but it also forced the government to consider drastic economic reforms. President Miguel de la Madrid led the charge after 1982, cutting public spending, reducing subsidies, and signing the General Agreement on Tariffs and Trade (the predecessor of the World Trade Organization), which committed Mexico to lowering tariffs and trade barriers. His successor, Carlos Salinas, was even more aggressive. He eradicated the traditional ejido (communal landholding) system, privatized hundreds of public companies, and negotiated NAFTA with the United States and Canada, a treaty that was, at the time, the most comprehensive and ambitious free-trade agreement in the world.

These policies helped, but in 1994, Mexico stumbled again. An overvalued peso, a weak banking sector, dwindling foreign reserves, and the PRI's elevated preelection spending led to yet another financial mess. The peso lost half its value in just weeks, GDP fell by seven percent, inflation soared to triple digits, and over one million Mexicans lost their jobs. Fortunately, due to the trade security provided by NAFTA and earlier reforms that had opened the economy, the recession was relatively short, with recovery beginning in 1996. Even better, Mexico emerged with a strong fiscal management system, including an independent central bank dedicated to curbing inflation and a finance ministry committed to balancing the federal budget.

The combination of permanent access to the world's largest consumer market, through NAFTA, and currency devaluation made Mexican businesses more globally competitive and led to a manufacturing boom and a fourfold surge in exports between 1990 and 2000. Industries producing goods such as auto parts, electronics, and apparel added some 800,000 jobs, pushing the total number of factory workers to well over one million. Foreign direct investment poured in, averaging $11 billion a year in the late 1990s.

Other economic transformations also accelerated during this time. Over two million farmers were put out of work as small-scale agriculture became unprofitable in the face of subsidized U.S. agribusiness. This reflects the harsh implications of NAFTA, but it is also a trend that is common to many industrializing economies, in which manufacturing and services replace agriculture as the drivers of economic growth and employment. In addition, oil became much less important to the economy. To be sure, it still funds over a third of the federal budget, but as a share of GDP, it fell from a peak of nearly 20 percent in 1981 to around six percent today.

MEXICO'S MIDDLE

Along with these economic reforms came significant social changes, especially the rise of Mexico's middle class. By the early 1980s, the country's middle class had grown to about a third of the population, thanks to the PRI's commitment to accessible education and the expansion of public-sector employment. But the 1982 financial crisis and the subsequent reforms of the late 1980s and early 1990s hurt the government-nurtured middle class by trimming public-sector jobs and government subsidies and largess.

At the same time, these reforms opened up the space for a more diverse, less PRI-dependent middle class to grow. The past 15 years of economic stability have bettered the lives of many Mexicans, whose savings and investments are no longer repeatedly wiped out by financial crises. NAFTA has both increased investment in the economy and lowered costs for average Mexicans. A study by Tufts University's Global Development and Environment Institute shows that the agreement has lowered the price of basic goods in Mexico by some 50 percent, making salaries go much further than in the past. In addition, growing access to credit has enabled millions of Mexicans to buy their own homes and start or expand businesses.

As a result, modern Mexico is a middle-class country. The World Bank estimates that some 95 percent of Mexico's population is in the middle or the upper class. The Organization for Economic Cooperation and Development (OECD) also puts most of Mexico's population on the upper rungs, estimating that 50 percent of Mexicans are middle class and another 35 percent are upper class. Even the most stringent measurement, comparing incomes alongside access to health care, education, social security, housing, and food, finds that just over 45 percent of Mexicans are considered poor -- meaning that almost 55 percent are not.

According to the World Bank, more than three-quarters of Mexicans are city dwellers, and the growing middle class is a decidedly urban phenomenon. Today's middle-class Mexicans are also much less dependent on the government than their parents were, as most work in the private sector. These professionals frequently fill jobs as accountants, lawyers, engineers, entrepreneurs, specialized factory workers, taxi drivers, or midlevel managers in Mexico's growing service and manufacturing sectors.

In addition, Mexico's work force includes more women than ever before. Forty-five percent of Mexican women now work outside their homes -- more than double the rate of 30 years ago. Although there are fewer dual-income households in Mexico than in many other developing countries, they are increasingly common. This trend is tied to a change in average family size, which has allowed women to pursue their own careers. In the 1970s, the typical Mexican family included seven children. Today, most women have only two children, which is the average in the United States. And Mexican children now spend much more time in school than they did in the past. In 1990, most children made it through only the primary grades. Today, the majority remain through high school.

As the number of Mexicans with greater earnings has increased, so, too, has consumption. With middle-class annual individual incomes estimated at somewhere between $7,000 and $85,000, households now earn enough to buy modern appliances, such as refrigerators, televisions, and washing machines. Approximately 80 percent of all Mexicans own a cell phone, half own a car, and nearly a third own a computer. The media might depict Mexico as a crime-ridden battlefield, but the country boasts a middle-income, emerging-market economy.

NOT YOUR PARENTS' PRI

As Mexico's economy and society have changed, so has its politics. For decades, the PRI maintained political control through what the Peruvian writer Mario Vargas Llosa dubbed "the perfect dictatorship": buying votes, co-opting the opposition, and cracking down on dissidents. The seeds of democracy were planted in the 1980s, when voters, frustrated with the status quo, started supporting opposition candidates in regional elections. Political change gained momentum after the 1994 economic crisis, when dissatisfaction with the regime escalated. The PRI's control suffered a further blow from a 1996 electoral reform that made voter fraud harder to commit. In the late 1990s, the growing middle class abandoned the PRI altogether, first in the 1997 congressional elections and then in the 2000 presidential contest, in which it helped elect Vicente Fox of the National Action Party.

In 2012, voters, concerned about waning economic growth and unrelenting drug violence, ushered the PRI back into the executive branch. Some worry that the party's return has sounded the death knell for Mexico's democracy. Sure enough, President Enrique Peña Nieto's administration includes some old-guard politicos not known for championing democratic ideals. But Mexico's political system has changed since the PRI last held high office. Both the legislative and the judicial branches of government now provide checks and balances against presidential power. Congress was once filled with a permanent majority of PRI delegates who rarely questioned the edicts of their president. Today, the PRI holds a plurality, not a majority, in both houses, which means the party will have to negotiate with the opposition to pass legislation.

The Supreme Court provides another check on executive power. In the old days, the justices blessed whatever legislation came their way. But thanks to President Ernesto Zedillo's overhaul of the justice system in the mid-1990s, the court has become an independent and final arbiter on many contentious issues. The court has passed judgment on topics as diverse as the constitutionality of new legislation, the rules governing elections, and the jurisdiction of civilian courts over the military. It even overturned the controversial "Televisa law," passed by Congress in 2006, which assured the continued duopoly of the two dominant television networks.

Since 2000, power has also become increasingly decentralized and regionalized. At one time, a president could dismiss half of Mexico's sitting governors without a hint of blowback, as Salinas did during his 1988–94 term. Today, states and their elected leaders are more independent, both politically and, increasingly, economically. Some worry that decentralization might bolster local authoritarianism, but in reality, it will prevent the return of the old political model; because regional executives are more autonomous now, they can stand up to federal politicians.

Other developments, especially the expansion of an independent press, have further enriched Mexico's democracy. A few decades ago, if PRI leaders were displeased with news coverage, they could literally stop the presses, because the party held a monopoly on newsprint. Subsequent economic crises, however, and declining political power lessened the PRI's control of the media. Today, Mexico has a vibrant and fiercely independent press, led by publications such as El Universal, Reforma, and La Jornada. With the proliferation of social media and with information now publicly available through Mexico's freedom of information law, passed in 2002, Mexican civil-society organizations and individual voters can criticize and shame corrupt bureaucrats and politicians. Bulwarked by such fundamentals -- checks and balances, an independent press, and a growing civil society -- Mexican democracy seems here to stay.

ROADBLOCKS

Still, many problems hold Mexico back. In recent decades, Mexico City has done little to bust the monopolies and oligopolies that hobble the country's growth, and in some cases, it has strengthened them. In addition to the state's control of energy, one or just a few companies still dominate the production of goods such as cement, glass, soft drinks, flour, sugar, and bread. The OECD estimates that these monopolies increase basic costs for Mexican families by some 40 percent. The Peña Nieto administration has promised to open up the energy sector, and some initial steps have been taken by regulators and the Supreme Court to break up these concentrations of economic power. Much more needs to happen, however, to level the economic playing field.

Shoddy infrastructure further limits Mexico's progress. Just over a third of its roads are paved, and its railways, ports, and airports fall short of filling the country's growing needs. There is little hope that this will improve anytime soon. Despite the promises of successive governments and leaders, from the PRI and the opposition alike, the World Bank estimates that public spending in Mexico is only half of what is needed for basic transportation maintenance, never mind necessary additions. Plans for aggressive spending have failed in the past -- first because of a lack of technically savvy bureaucrats able to take charge and push the projects through and later because of the global economic crisis. As a result, even though Mexico has advanced in the World Economic Forum's annual Global Competitiveness Report on measures such as access to financing and technology, it has stagnated in its infrastructure ranking.

Mexico's educational system is also subpar. Children now stay in school longer, but they do not seem to be getting much for their time. On tests by the Program for International Student Assessment, which compare academic performance, Mexico's students score lower than students from all the other OECD countries in reading, math, and science. Employers and graduates complain about the mismatch between training and opportunities: too many political science majors, for example, and not enough engineers. According to a study by Mexico's National Association of Universities and Higher Education Institutions, 40 percent of Mexican university graduates over the last ten years are now unemployed or working in a different field from the one they studied. Mexico needs to develop a properly trained work force if it is to ensure future prosperity.

Even more pressing, Mexico must deal with its crime problem. Extortion, kidnapping, and theft, not to mention rampant assault and murder, stunt economic growth ­-- particularly that of small and medium-sized enterprises (the job creators in most economies), which cannot afford private security. Violence discourages domestic and foreign investment, preventing the construction of new factories that would provide jobs and boost local economies. Estimates by the Mexican government, as well as by private-sector investors, such as J.P. Morgan, suggest that insecurity shaves more than one percent off Mexico's GDP annually.

Crippled by corruption and impunity, the state fails to provide basic safety for many of its citizens. Several parts of the country lack effective police forces and sound court systems. New tools, such as the freedom of information act and enhanced press coverage, have helped expose wrongdoing, but such liberties are often fitfully employed, especially at the state and local level, where politicians and vested interests push back. So far, only a few heavy hitters have been successfully prosecuted for their misdeeds. Mexico's ban on the reelection of any official, from the local mayor to the president, makes politicians more concerned with pleasing party leaders (who can nominate them for their next position) than with serving their constituents. Civil-society leaders have called for a reform of this part of the constitution, but so far their efforts have failed.

Mexico City has taken some corrective steps in recent years, and levels of violence are declining in hotspots such as Ciudad Juárez and seem to have plateaued nationally. But the process of fundamentally transforming Mexico's law enforcement and justice systems is still ongoing. Mexico needs to expand its police training and reforms beyond the national level to reach state- and local-level forces and to finish revamping its justice system, creating courts that can punish the guilty and free the innocent. Although the new government has promised both, it remains to be seen if Peña Nieto will do what is necessary, throwing the full force of his administration behind these efforts.

If Mexico addresses these challenges, it will emerge as a powerful player on the international stage. A democratic and safe Mexico would attract billions of dollars in foreign investment and propel the country into the world's top economic ranks. Robust growth would both reduce northbound emigration and increase southbound trade, benefiting U.S. employers and employees alike. Already influential in the G-20 and other multilateral organizations, Mexico could become even more of a power broker in global institutions and help construct new international financial, trade, and climate-change accords.

After three transformative decades, Mexico is still forging its geopolitical, economic, and social identity. It can continue down the path toward becoming a top-ten world economy, a strong democracy with a middle-class society, and a confident global player. Or it can be consumed by its challenges -- violence, crime, crumbling infrastructure, a weak educational system, economic roadblocks, and persistent corruption. Either way, Mexico's future will affect the United States.

BORDER BUDDIES

Since NAFTA was passed, U.S.-Mexican trade has more than tripled. Well over $1 billion worth of goods crosses the U.S.-Mexican border every day, as do 3,000 people, 12,000 trucks, and 1,200 railcars. Mexico is second only to Canada as a destination for U.S. goods, and sales to Mexico support an estimated six million American jobs, according to a report published by the Woodrow Wilson International Center's Mexico Institute. The composition of that bilateral trade has also changed in recent decades. Approximately 40 percent of the products made in Mexico today have parts that come from the United States. Many consumer goods, including cars, televisions, and computers, cross the border more than once during their production.

Admittedly, this process has sent some U.S. jobs south, but overall, cross-border production is good for U.S. employment. There is evidence that U.S. companies with overseas operations are more likely to create domestic jobs than those based solely in the United States. Using data collected confidentially from thousands of large U.S. manufacturing firms, the scholars Mihir Desai, C. Fritz Foley, and James Hines upended the conventional wisdom in a 2008 study, which found that when companies ramp up their investment and employment internationally, they invest more and hire more people at home, too. Overseas operations make companies more productive and competitive, and with improved products, lower prices, and higher sales, they are able to create new jobs everywhere. Washington should welcome the expansion of U.S. companies in Mexico because increasing cross-border production and trade between the two countries would boost U.S. employment and growth. Mexico is a ready, willing, and able economic partner, with which the United States has closer ties than it does with any other emerging-market country.

Familial and communal ties also unite the United States and Mexico. The number of Mexican immigrants in the United States doubled in the 1980s and then doubled again in the 1990s. Fleeing poor economic and employment conditions in Mexico and attracted by labor demand and family and community members already in the United States, an estimated ten million Mexicans have come north over the past three decades. This flow has recently slowed, thanks to changing demographics and economic improvements in Mexico and a weakening U.S. economy. Still, some 12 million Mexicans and over 30 million Mexican Americans call the United States home.

For all these reasons, the United States should strengthen its relationship with its neighbor, starting with immigration laws that support the binational individuals and communities that already exist in the United States and encourage the legal immigration of Mexican workers and their families. U.S. President Barack Obama has promised to send such legislation to Congress, but a strong anti-immigrant wing within the Republican Party and the slow U.S. economic recovery pose significant barriers to a comprehensive and far-reaching deal.

Nevertheless, the United States and Mexico urgently need to invest in border infrastructure, standardize their customs forms, and work to better facilitate legal trade between them. Furthermore, getting Americans to recognize the benefits of cross-border production will be an uphill battle, but it is one worth fighting in order to boost the United States' exports, jobs, and overall economic growth.

On the security front, U.S. efforts must move beyond cracking down on drug trafficking to helping Mexico combat crime more generally. Security links have expanded since 2007, when Washington and Mexico City began taking on drug traffickers together. Today, Obama should support Peña Nieto's strategy of cracking down on violence rather than try to eliminate the drug trade. Washington should also expand its law enforcement training programs, currently conducted primarily at the federal level, to Mexico's state and local police forces and justice systems. Washington and Mexico City should also invest together in border community projects and programs that support social and economic development in often neglected and crime-ridden areas.

New administrations are beginning their terms in both countries. In Mexico, Peña Nieto has six years to overcome his country's remaining economic, social, and political barriers. Obama has the opportunity to strengthen U.S. manufacturing, production, and security by working with the United States' increasingly prosperous neighbor. It is in the interests of both countries to form a lasting partnership now.