“IN ESTABLISHING the rule of law, the first five centuries are always the hardest.” For much of the past two decades, that quip by Gordon Brown, a former British prime minister, has seemed not just dour, but wrong. Buoyed by China, by trade growth and capital inflows, by talk of new middle classes and the bottom billion, it was easy to forget old truths about how hard it is for poor countries to become rich. A breezy assumption took hold: that emerging markets would surely follow the likes of South Korea and Taiwan on the path to wealth.

That view of development has crumbled of late, along with emerging markets’ growth rates. China, the locomotive to which many are still hitched, is slowing. Russia, South Africa and Brazil (see article) are in reverse gear. Their currencies drop with every fall in commodity prices; they will no doubt weaken further if the Federal Reserve raises American interest rates in a meeting due to end after we went to press. Trade is growing more slowly than global GDP, a trend that seems unlikely to reverse soon (see article). All of this makes the trajectory taken by the East Asian tigers seem ever more exceptional.

A more realistic model of development is Mexico, a country that has parlayed its considerable advantages into patches of modernity but has singularly failed to eradicate poverty nationwide (see article). Some of its disappointments can be laid at the door of specific policies. But they also reflect the difficulties countries face throughout the emerging world.

Duet for one

Mexico has a lot going for it just now. Its economy is tied to America’s rather than China’s: in a week it sells more exports to the world’s largest consumer market than it does to China in a year. Once dependent on oil, it has Latin America’s largest and most sophisticated industrial base, exporting more cars than any country except Germany, Japan and South Korea. For two decades its macroeconomic management has been impeccably orthodox. Recently, it has thrown open its oil industry to private investment, and has tackled private monopolies. A vibrant Mexican middle class prospers along an industrial corridor running from the American border down to Mexico City. Its political system is essentially stable.

Yet despite decades of reforms—at times half-hearted, at times full-throttled—Mexico has failed to bridge the gap between a globalised minority and a majority that lives in what Enrique Peña Nieto, the president, admits is “backwardness and poverty”. Since 1994, when Mexico joined the North American Free Trade Agreement, income per head has grown by an annual average of barely 1%. About half the population remains stuck in poverty; another quarter risks slipping back into penury. Lawlessness, corruption and conflicts of interest prevail among the police, courts and politicians supposed to care for the marginalised.

Mexico’s duality shows that getting macroeconomic policy right is necessary to success, but not sufficient. The difficulties it still faces are a cautionary tale. The first lesson, and easiest to learn, is the centrality of urbanisation. Cities offer people opportunities to prosper that cannot be found in the countryside: about 120,000 people in Asia are migrating to cities every day, for example. But unless cities provide transport, power, sanitation and security, they will fail to fulfil their economic potential. Violent, drug-related crime stalks Mexico’s scruffy barrios, where city-dwellers live. In South Africa the lack of public transport obliges slum-dwellers to take expensive minibus-taxis to work. Cities in Pakistan and the Philippines are plagued by blackouts. Slums ought to be every moderniser’s priority. They are where most people live, and where jobs, schools and technology are closest to hand.

Roads and rails

The second is the importance of infrastructure, and not just in the cities. Many of the foundations of the modern Mexican economy were laid a century ago, in the form of roads and railways tying its industrial heartland to its ports and the northern border. That leaves swathes of the country unconnected. Centralisation breeds anomalies: beach resorts often buy their seafood in Mexico City’s wholesale market, hundreds of miles from the coast. Yet linking up parts of a country is not easy. It takes both investors willing to bear risk and also politicians prepared to take on the status quo. In India, for example, plans for big infrastructure projects have been frustrated by squabbles over land and a dearth of long-term financing.

A third lesson from Mexico is the need to bring the informal economy into the light. Small, unregistered firms provide employment to most of the labour force, but are shunned by banks and anxious to remain below the taxman’s radar. That saps the domestic economy. In the past decade and a half, while the productivity of the biggest Mexican companies has grown by 5.8% a year, that of the smallest has plunged by 6.5% a year. This problem is as prevalent in Mexico’s changarros, where tacos sizzle alongside every bus stop, as it is in the shops and stalls of India, where only 2% of food and grocery retailing is in the formal sector. Electronic invoicing, which creates digital trails for the taxman, and mobile banking, which brings poor people out of the cash economy, both offer promise.

But the ubiquity of informal firms also points to a final lesson—the corrosive effects of a general lack of trust. Without enforceable laws and contracts, public services that make taxes seem worth paying and a political establishment that serves the national interest, the only institution that most people can rely on is the family. As Mr Brown hinted, it can take generations to build institutions that enable people to trust arm’s-length transactions. But it is not impossible. Witness the confidence now invested in Mexico’s and Brazil’s central banks, or South Africa’s tax authorities.

Even the boldest reformer could not rapidly resolve all of these problems. This is the less cheering message of the two Mexicos: for all but a handful of countries, the road to prosperity is hard and long. But Mexico’s successes also demonstrate that it does exist. Even if the gains must be measured in decades, perseverance eventually brings rewards.