Last week Malala Yousafzai, a sixteen-year-old Pakistani schoolgirl made the United Nations interesting for a day.

Shot in the head by a Taliban gunman for her outspoken campaign for girls’ rights to education, Malala gave a defiant and inspiring speech to the General Assembly. “Let us pick up our books and our pens,” she said. “They are our most powerful weapons. One child, one teacher, one book and one pen can change the world.”

Instead of silencing a critic, the Taliban has inadvertently created a global champion for girls’ education. Malala’s speech was a challenge to the western governments that applauded her, but that have been cutting back on aid for education.

Download the new Independent Premium app Sharing the full story, not just the headlines

The speech was an even starker challenge to Pakistan’s political elite.

There is no question that the Taliban and other militant Islamic groups represent a formidable barrier to education in Pakistan. Yet harmful as the Taliban’s presence may be, the destructive force of government inertia is even greater. Successive governments have failed to address an education crisis that is locking millions of children into poverty, and the country to economic stagnation, mass unemployment, and political instability.

Pakistani President Asif Ali Zardari condemned the Taliban’s actions as ‘an attack on education’ and civilisation. Nawaz Sharif, opposition leader at the time and now Prime Minister, declared Malala ‘the daughter of the nation’. In a tragic-comic episode, even the Taliban has made a half-hearted effort at an apology.

Failing

To describe Pakistan as an under-performer in education would be an epic understatement. One in every four primary-age children – 5 million in total – are out of school, and around half of those drop out before completing grade 3.

Behind the national data are some of the world’s deepest inequalities in education. While children from the richest 20 per cent of Pakistan’s households spend almost 10 years in school, those from the poorest spend only two years and poor rural girls in particular average less than one year.

Comparisons with regional neighbours make for painful reading. Bangladesh has eliminated gender inequalities, India has dramatically expanded access to schooling, and even Nepal is leaving Pakistan in its slipstream. Today, Pakistan is a middle-income country with education indicators that compare unfavourably with poorer countries such as Ethiopia and Tanzania.

What has gone wrong? Pakistan’s education system is riddled with corruption, bureaucratic inefficiency, and political infighting – and it is starved of resources, with less than 2 per cent of GDP invested in education. One third of the country’s schools lack toilets, clean water and decent classrooms. There are chronic shortages of textbooks. Bad governance and poor morale has produced an epidemic of teacher absenteeism. And while the state ‘guarantees’ free education, the lack of public finance leaves parents to foot the bill for schooling with millions too poor to pay.

It’s not all bad news.

The past decade has seen a wave of education reforms. State governments in Punjab and Sindh have established education foundations that support innovative public-private partnerships. Sindh has targeted poor rural areas by working through local non-government organisations. Local governments in the North West Frontier Province and tribal areas have worked through local communities to undercut Taliban influence. Progress has been painstakingly slow and erratic, but enrolment rates and learning levels are edging upwards.

International aid has played an important role. Pakistan is about to become the biggest recipient of development assistance from the UK, with half of the £446 million that has been committed for 2014 going to education.

Tax

More efficient public finances would make a much bigger difference, however. When it comes to tax payments Pakistan’s elite make Google and Starbucks look like amateurs. The tax-to-GDP ratio is less than 10%, one of the lowest in the world. The reason: tax codes have been designed to minimise liabilities and maximise opportunities for tax evasion. According to one estimate from the Planning Commission, the country loses in excess of $3 billion annually through tax loopholes, – roughly double the education budget.

As a recent report by the UK’s Select Committee on Development concluded, it’s difficult to justify increased aid when Pakistan’s elite treat tax evasion as a national sport. Few politicians, including cabinet members, trouble themselves to file tax returns.

To her credit, Justine Greening, UK Secretary of State for International Development, has how signalled a tougher stance. She has backed an aid programme aimed at increasing tax collection with a call on Nawaz Sharif’s government to raise the tax-to-GDP ratio to 15 per cent. But the Prime Minister himself, the fifth richest person in Pakistan with a net worth $1.1bn, has a less-than-stellar record on taxation.

Education lies at the heart of the country’s greatest challenges. Today, Pakistan has one of the world’s youngest, fastest growing and most rapidly urbanising populations. Half the population is under 20 and the working-age population will double in the next two decades.

Pakistan stands to reap a demographic dividend if its education system can equip the country’s youth with essential skills to drive the 7 per cent economic growth needed to generate another 2-3 million jobs annually. Failure to do so will see a growing stream of frustrated youth facing a future without hope, in a country gripped by economic stagnation and with attendant threats to national security.

Fixing Pakistan’s education system will take political leadership at home and sustained support from aid donors. It won’t be easy.

But a 16-year-old school girl has shown the world what Pakistan’s future could look like. Perhaps the Pakistani Government could take a leaf out of Malala’s book and demonstrate the resolve and ambition needed to make education a right for all children in the country.