In an important article this week, the former Conservative treasurer Lord Ashcroft pointed to polling which shows that, for all his recent omnishambolic problems, David Cameron still remains his party's greatest single asset. Mr Cameron's own net satisfaction rating is, however, badly on the slide. In his early days as prime minister his net satisfaction rating was briefly as high as +47 (in other words, 63% of all voters thought he was doing a good job, while 16% thought he was doing a bad one). Today, that net figure has lurched to -25 (with 35% thinking he is doing well, against 60% who think he is doing badly), which puts him level pegging with Ed Miliband. Mr Cameron badly needs to get those numbers back up. In Lord Ashcroft's view, the key is to provide a clearer sense of direction.

It would be odd if Mr Cameron, notwithstanding his dangerous tendency to insouciance about his mistakes, did not grasp this too. And this surely was part of the explanation of the prime minister's remarkably clear condemnation of the comedian Jimmy Carr's Jersey-based tax avoidance scheme this week as "morally wrong". As a Conservative ministerial stance it was not unprecedented; three months ago in his budget speech, George Osborne condemned tax evasion and "aggressive tax avoidance" as "morally repugnant". Nevertheless, Mr Cameron's intervention was certainly a powerful statement, both because it was a striking contrast with New Labour's famously relaxed approach to personal wealth and because it is so at odds with the potently anti-tax possessive individualism bequeathed to the Tory party by Lady Thatcher. Whether it provided the sense of direction which Lord Ashcroft, whose attention to tax matters is well known, had in mind is more open to doubt. However, to the millions who pay their taxes in the spirit of the words of the great American jurist Oliver Wendell Holmes that "taxes are what we pay for a civilised society", Mr Cameron's attack had a refreshing directness.

Judging by the reactions in the first 48 hours since he attacked Mr Carr, however, Mr Cameron has stirred at least as much opposition as support. That is not because what he said was wrong. It was not. It was right. What explains the mixed reaction is that by this stage of his premiership Mr Cameron has squandered significant amounts of the political capital that he built up in the years of opposition. If he had said what he said this week in 2010, he would have been far more widely praised than he has been today. That's because, in 2010, plenty of middle-ground and nonpartisan opinion was still impressed with the avowedly liberal Toryism that Mr Cameron stood for. That is far less true today, after the politically disastrous tax cuts (as opposed to the anti-avoidance rhetoric) of the Osborne budget, and in the wake of the ignominious implosion of the Conservatives' "all in this together" stance.

Today, in the wake of such disproportionate government attention to the benefits scams of the poor as opposed to the infinitely greedier tax scams of the rich – to say nothing of his government's overall economic record – Mr Cameron has lost much of the credibility he so painstakingly built up after 2006. His hold over the Tory party's rightwing, never tight, has also loosened. As a result, Mr Cameron is under attack from the left, from people who think his economic moralising is selective and hypocritical, and from the right, from those who hate taxes and public services and who are outraged that a leader of Lady Thatcher's party should start attacking a tax avoidance culture which has their unconditional backing. It hardly needs saying that it will be much harder for Mr Cameron to rebuild his credibility on financial fairness in 2012 than it was in 2006. But he is right to try. Now he needs to press forward and not to retreat. There is no more important test facing the Tory party.