IN PINK COWBOY boots and a bright red Disney hat, Ángeles Zermeño is surely one of Mexico City’s most stylish three-year-olds. Her parents, Ricardo and Blanca, are thinking of having another child, perhaps in a year or so. But they have already decided that two will be enough. “The small family lives better,” says Mr Zermeño, a mechanic. The couple know this all too well: in rural Hidalgo they grew up with 29 aunts and uncles between them.

The changing shape of families such as the Zermeños has created a dramatic baby bust. Fifty years ago Mexico was one of the world’s great producers of people. In the 1960s Mexican women had an average of seven children each; now they have only 2.4, and before 2020 the number is expected to drop below two (see chart 6). That would give Mexico a lower fertility rate than the United States, which is expected to maintain its current rate of about 2.1. At the same time life expectancy has grown. In 1960 most Mexicans did not live beyond their 50s, and the average age was 17. Today the country has a wrinklier face. On average people live to 77, only a couple of years less than in the United States. Mexico’s shift from a big baby-producer to a fast-ageing nation will provide an enormous demographic dividend. It also harbours an almighty time-bomb. Lie back and think of Mexico The explosive population growth during much of the 20th century was encouraged by the government. Mexico lost nearly half its territory to the United States in 1848. It put this down partly to a failure to populate lonely wastelands such as California. Cranking out babies thus became a form of national security policy. “The idea was that to govern was to populate,” says Rodolfo Tuirán, a demographer who is now minister for higher education.

Everything changed in the 1970s. The nascent middle class noticed the opportunity cost of having large families, and as infant mortality dropped there was no longer a need to produce so many spares. The government made a U-turn: the right to a “free, responsible and informed” decision on how many children to have was enshrined in the constitution, and family-planning services were rolled out in spite of opposition from the Catholic church. Abortion remains illegal in most of the country, but contraception is widely accepted. Four out of ten married women are sterilised. On the desk of Salomón Chertorivski, the health secretary, is an enormous bowl of what look like business cards but turn out to be condoms, handed out to visitors with the compliments of the federal government.

The crash in the birth rate has brought a steady improvement in the dependency ratio. Forty years ago there was one dependent (usually a child) for every toiling worker. Now, and for the next 20 years, the ratio of workers to dependants will be more than two to one (see chart 5), easing the burden on the state in the same way that having fewer children has eased the burden on families. At the same time the large generation of workers getting ready to retire is expected to boost saving and investment. Mexico’s dependency ratio will be further helped by the drastic cut in migration of young workers to the United States (see article). Moreover, the country is maintaining fairly strong population growth. By 2025 the number of inhabitants is projected to grow by about 15%; in Brazil it will expand by around 10%. The UN expects Mexico’s population in 2050 to be 65% of Brazil’s, up from 57% in 2000. That won’t make its citizens any richer, but it will make its economy bigger. However, the demographic fillip needs to be worked at. “It’s a bonus if they prepare for it. It’s a problem if they don’t,” says Wendy Cunningham of the World Bank’s human-development department. “They must invest in education and training to make this big group of people more productive. If the assumption is that just having more labour will do it, it won’t work.” Don’t squander it

So far Mexico has been worryingly complacent. The Asian tigers made the most of their demographic dividend by creating some of the world’s best schools. Mexico’s, by contrast, are pretty bad. In tests set by the OECD, nine out of ten South Korean teenagers meet basic requirements in maths but only half of Mexican ones do. Much poorer countries such as Azerbaijan and Thailand achieve better results on smaller budgets. Higher education also needs beefing up: only 22% of 25- to 34-year-olds in Mexico have a tertiary qualification, against 37% in Chile. “There is a risk that Mexico will squander its demographic bonus,” says Mr Tuirán. Financial crises in the 1980s meant that less was invested in education, he adds. As if to illustrate his point, students denied university places this summer staged a noisy demonstration outside his office on Mexico City’s Plaza de Santo Domingo.

Still, education spending has been growing and now amounts to 6.2% of GDP, the same as the OECD average. But the money is spent badly. In primary schools 83% of non-capital expenditure goes on teachers’ pay, a bigger proportion than in any other OECD country. Teachers’ salaries are set and paid by their union, which publishes no accounts. Some “teachers” are union officials who do no teaching. Others are imaginary. A rare audit in 2008 found that one, in Chihuahua, was being paid 700,000 pesos (then $66,000) a month. There is now some testing of teachers, but apparently no consequences for the many who fail those tests. Elba Esther Gordillo, the union’s leader since 1988, confirmed in a recent interview that teaching positions could be bought for 50,000-100,000 pesos, a practice she said she found outrageous.

For now, the increase in the number of pensioners is more than compensated for by the fall in the birth rate, so the number of dependants is still falling. But starting in about a decade the dependency ratio will get steadily worse. The state will have to support a larger population of pensioners, just as families will have to help out ageing parents and grandparents.

The welfare net will thus need a serious revamp. At the moment many Mexicans are not even covered by it. The 5m or so who work in the public sector get a health and pension package, and so do salaried workers who pay into the state welfare system. But probably no more than 15m of the 40m who work in the private sector have this insurance, estimates Santiago Levy, a former head of Mexico’s Social Security Institute who is now at the Inter-American Development Bank. The uncovered include the self-employed as well as those who duck under the taxman’s radar or work in the informal sector.

On average, low earners spend about half their careers in the formal sector and half outside it. People who alternated between working in a textile factory and selling clothes door-to-door, for instance, would pay into the system only half the time. They would thus have to toil for 50 years to build up the 25 years of contributions required to get a basic pension. Because low earners are the most likely to work in the informal sector, “those who need pensions the most will get the least,” says Mr Levy.

A parallel system has slowly been growing to help the uninsured. The biggest example is in the health service (see box). Similar programmes to support informal workers have been set up in housing and child care. A universal pension, begun in left-leaning Mexico City, has been adopted by about half the states. A federal pension programme called “70 and up” has been expanded from small communities to bigger ones.

Millions have benefited, but there is a snag. If social services are available to all comers, there is little reason to work in the formal sector and pay taxes. Partly for that reason, informal employment has been growing faster than the formal sort. Some companies offer employees a choice: work formally for a given wage or informally for a slightly higher one. With health care and pensions available either way, workers are quite sensibly taking the informal route, but this will cause a further drop in fiscal revenues.

One solution would be to eliminate the difference between formal and informal employment by financing health care and social security through consumption rather than payroll taxes. Not everybody is a salaried employee, but everybody is a consumer, reasons Mr Levy, an advocate of this plan. “Instead of collecting taxes at the door of the factory, you would collect them at the door of the store,” he says. Consumption taxes are easier to enforce than payroll taxes. But they are also regressive, and would require subsidies to ensure that Mexico’s yawning inequalities do not widen further.

Mr Peña has trailed fiscal reform as one of his big legislative projects, not least to increase revenues sufficiently to allow Pemex, the state oil monopoly (which provides about a third of the government’s income), to invest more in exploration and technology. He has also promised a new “universal social-security system” to provide health and unemployment insurance and pensions, financed by general taxation. Congress already has a lot on its plate, but it would do better to overhaul the system now than wait until the demographic time bomb goes off.