In a country where almost no-one pays income tax, including more than two thirds of MPs, it only took seven months for Ali Arshad Hakeem to become a hated man.
As Pakistan's newly minted chief taxman, he built a database designed to monitor the spending habits of millions of people, and work out how much tax they owed.
At the click of a mouse, he could call up details of the elite's holiday habits, electricity bills and bank accounts, complete with photos addresses and vehicle details.
This quiet, technocratic revolution came to a juddering halt last month, when Mr Hakeem was suspended by judges over allegations that his appointment breached government rules that demand each job be filled from a shortlist of three.
In Pakistan's murky world of political appointments and patronage systems, few believe that was the real reason. Instead, his supporters say he was simply too successful in forcing people to pay more taxes. In other words, he was too good at doing his job.
A recent report by Pakistan's Centre for Investigative Reporting revealed that President Asif Ali Zardari and Rehman Malik, interior minister until mid-March when the government stepped down ahead of next week's elections, were among those politicians who paid nothing.
It made gloomy reading for anyone wondering whether there was any will inside Pakistan to reform. "The problem starts at the top," the report stated. "Those who make revenue policies, run the government and collect taxes, have not been able to set good examples for others."
Two of Mr Hakeem's key appointments have since transferred, moving them away from jobs where he said they would have helped bring more than £1.3 billion into government coffers.
"It's gone. And I'm not going to do it again," Mr Hakeem, 49, told The Sunday Telegraph - his relaxed demeanour and easy smile belying the bitterness he feels.
Much of his work has been undone in the short time since he was forced out, he said, and he had no appetite to take on the courts or challenge his suspension. His wife and children had already suffered enough stress.
"I hate it. I worked 20 hours a day. I've taken so much hatred for this, everyone is my enemy and out to get me - and then they sack me. Angry is not even the word," he said.
The decision to oust him will worry international donors who have kept pressure on Pakistan to shake up its anaemic tax system. They fear that without economic growth and an expanding revenue, the country's growing population could tip what is a fragile state into a failed state.
Pakistan is officially classed as a middle income country. It has the resources to build more than 100 nuclear warheads yet depends on handouts to keep its power stations, schools and hospitals running.
Last month British MPs highlighted that the UK is planning to inject almost £1.4 billion of British taxpayers money into Pakistan over five years, while only 0.57 per cent of Pakistanis - just one in 175 - pay any income tax at all. They concluded that any increases in aid must be tied to improvement in tax collection.
Imran Khan, the cricketing superstar turned politician, has made stemming corruption the central plank of his campaign for Saturday's general election. But the omens are not good if Mr Hakeem's experiences are anything to go by.
His arrival brought a joined-up approach to tax, developed from his training as an engineer, coupled with an MBA and time spent in the private sector. With his rugged looks and thick grey hair he stands out among the time-serving officers that inhabit much of Pakistan's bureaucracy.
He linked government databases on cars, imports, exports and sales tax among others to build a powerful tool for the Federal Board of Revenue that could identify individuals and companies that were not paying their way. For income tax, his team fed 1,700 factors into a model which calculated how much was owed.
Armed with these data, he proposed a national amnesty and a chance for more than three million people to wipe the slate clean by paying about £250 each.
That carrot would have been accompanied by a pretty firm stick. The government would have suspended non-payers' identity cards, prohibiting travel abroad and making it difficult to buy a house. As a last resort he threatened to "name and shame" offenders by making records available on line.
"It's not a lot and we could have collected it," he said, during an interview in a guesthouse for government employees in Islamabad.
Once coaxed into the system, taxpayers would have been subjected to the usual rates - potentially raising the number of taxpayers from 700,000 to 3.9 million at a stroke.
Even before he was removed from office, his plan suffered a setback with parliamentarians failing to submit his bill before they broke up for next week's elections.
But there have been successes too, especially where he succeeded in tackling scams of breathtaking imagination.
His team collected £26 million from the country's textile sector in back taxes after they calculated that local sales were being passed off as exports, which are zero rated for tax. One commentator said the official figures suggested Pakistanis were walking around naked, such was the tiny volume of clothing being produced for the local market.
Millions of pounds more have come from a clampdown on cars brought into the country without duty being paid. Smart addresses around the country were raided and hundreds of those Mercedes and BMWs seized, parked like trophies at the tax office until their owners paid.
And his team investigated a scam involving containers arriving in Karachi which were supposedly destined for Nato-led international forces in Afghanistan. That trade is exempt from tax but was being used to illegally import cars, cigarettes and alcohol for the Pakistan market.
Mr Hakeem estimates that the illegal trade was worth about £1.3 billion to the federal treasury each year, dwarfing the money that Britain spends on aid.
"Over and above that it distorts the market, it kills local industry and destroys the sales tax system, because goods are arriving that we don't know about," he said.
It was that investigation that may have led to his downfall. Three weeks ago, a judge at Islamabad High Court ordered Mr Hakeem to stop work and a new chairman was appointed to take his place.
A spokeswoman for the FBR declined to comment while Mr Hakeem's case remained before the court, but Umar Cheema, author of the report that showed how few politicians pay tax, said anyone attempting reform risked being brought down.
"He made people realise the FBR was doing something under his watch, even though he was not there for very long" he said.
He pointed out that the official who has taken Mr Hakeem's place is himself due to reach retirement age and step down next month, having had only a few weeks in the job. "This shows the level of 'seriousness'," he said.
His experience has left Mr Hakeem bitter and frustrated, and ready to return to the private sector, perhaps in Britain where he earned his MBA from Cranfield University. His one consolation is that for seven months his high-profile drive brought tax to the top of the political agenda.
Now it is up to whoever wins next weekend's election to continue that work.
"My success is that everyone is talking tax," he said. "Nobody had even talked about it before."