IN 1931 Mahatma Gandhi ridiculed the idea that India might have universal primary education “inside of a century”. He was too pessimistic. Since 1980 the share of Indian teenagers who have had no schooling has fallen from about half to less than one in ten. That is a big, if belated, success for the country with more school-age children, 260m, than any other.

Yet India has failed these children. Many learn precious little at school. India may be famous for its elite doctors and engineers, but half of its nine-year-olds cannot do a sum as simple as eight plus nine. Half of ten-year-old Indians cannot read a paragraph meant for seven-year-olds. At 15, pupils in Tamil Nadu and Himachal Pradesh are five years behind their (better-off) peers in Shanghai. The average 15-year-old from these states would be in the bottom 2% of an American class. With few old people and a falling birth rate, India has a youth bulge: 13% of its inhabitants are teenagers, compared with 8% in China and 7% in Europe. But if its schools remain lousy, that demographic dividend will be wasted.

India has long had a lopsided education system. In colonial times the British set up universities to train civil servants, while neglecting schools. India’s first elected leaders expanded this system, pouring money into top-notch colleges to supply engineers to state-owned industries. By contrast, Asian tigers such as South Korea and Taiwan focused on schools. Of late, India has done more to help those left behind. Spending on schools rose by about 80% in 2011-15. The literacy rate has risen from 52% in 1991 to 74% in 2011. Free school lunches—one of the world’s largest nutrition schemes—help millions of pupils who might otherwise be too hungry to learn.

Pointless pampered pedagogues

However, the quality of schools remains a scandal. Many teachers are simply not up to the job. Since 2011, when the government introduced a test for aspiring teachers, as many as 99% of applicants have failed each year. Curriculums are over-ambitious relics of an era when only a select few went to school. Since pupils automatically move up each year, teachers do not bother to ensure that they understand their lessons. Overmighty teachers’ unions—which, in effect, are guaranteed seats in some state legislatures—make matters worse. Teachers’ salaries, already high, have more than doubled over the past two rounds of pay negotiations. Some teachers, having paid bribes to be hired in the first place, treat the job as a sinecure. Shockingly, a quarter play truant each day.

Frustrated by the government system, and keen for their children to learn English, parents have turned to low-cost private schools, many of which are bilingual. In five years their enrolment has increased by 17m, as against a fall of 13m in public schools. These private schools can be as good as or better than public schools despite having much smaller budgets. In Uttar Pradesh the flight to private schools almost emptied some public ones. But when it was suggested that teachers without pupils move to schools that needed them, they staged violent protests and the state backed down.

India spends about 2.7% of GDP on schools, a lower share than many countries. Narendra Modi, the prime minister, once vowed to bump up education spending to 6%. However, extra money will be wasted without reform in three areas. The first is making sure that children are taught at the right level. Curriculums should be simpler. Pupils cannot be left to pass through grades without mastering material. Remedial “learning camps”, such as the ones run by charities like Pratham, can help. So can technology: for example, EkStep, a philanthropic venture, gives children free digital access to teaching materials.

The second task is to make the system more meritocratic and accountable. Teachers should be recruited for their talents, not their connections. They should be trained better and rewarded on the basis of what children actually learn. (They should also be sackable if they fail to show up.) The government should use more rigorous measures to find out which of a hotch-potch of bureaucratic and charitable efforts make a difference. And policymakers should do more to help good private providers—the third area of reform. Vouchers and public-private partnerships could help the best operators of low-cost private schools expand.

Mr Modi’s government has made encouraging noises about toughening accountability and improving curriculums. But, wary of the unions, it remains too cautious. Granted, authority over education is split between the centre and the states, so Mr Modi is not omnipotent. But he could do a lot more. His promise to create a “new India” will be hollow if his country is stuck with schools from the 19th century.