The Treasury is angry with the Office for National Statistics (ONS). The prime minister is angry with the Treasury. The UK's European partners are angry with the prime minister. The prime minister is angry with the European Commission. And so it goes on.

The rows are all about the sudden news last week that Britain was being asked to pay an extra £1.7bn to Brussels as a result of revisions to the data on the British economy's performance going back for a number of years. (Depending on whom you ask, the number of years differs but it seems that they go back to the late 1990s.)

\'Was David Cameron ambushed by George Osborne, who is known to be bored by European matters?\' Reuters

What is abundantly clear is the revisions are on an industrial scale, giving scope for all manner of conspiracy theories: was David Cameron ambushed by the Brussels Commission when he arrived at an EU summit that was supposed to be about climate change?

Was he ambushed by his own chancellor, George Osborne, who is known to be bored by European matters and may not have read his brief until the eleventh hour?

Well, as a long-time observer of both Whitehall and Brussels, your correspondent is more inclined to the cock-up theory. The last thing our European partners wish us to do is leave the European Union and they are well aware of the sensitivity of Cameron's position vis-à-vis the rise of Ukip.

While it has been blatantly obvious for a long time that Osborne would like to succeed Cameron as leader of the Conservative Party in due course, relations between the two are much more cordial than they ever were between Tony Blair and Gordon Brown. But it does look as though the chancellor was remiss in not alerting his prime minister to what was in store.

In a way the episode is a classic case of "comeuppance", or "pride comes before a fall".

The British government has been boasting about its recent growth performance and how much better it has been than that of the eurozone, although it brushes over the way that the economy "flatlined" for almost three years after the coalition took office in summer 2010 .

Nigel Farage
\'Frightened of Nigel Farage and Ukip, Cameron seems to be moving closer and closer to an EU exit\' Reuters

However, in addition to those statistical revisions that have so annoyed the Treasury, the calculations that lie behind the request for a higher net contribution also reflect the better performance of British economy in the last few years.

This has given rise to all sorts of cheap jokes about how, although we boast about not being in the eurozone, we are now having to bail them out.

The British press, especially the predominantly eurosceptic newspapers, have made a meal of the £1.7bn figure, although the truth is this is the sum of a number of much smaller figures, amounting to some £150m a year. It turns out the UK underpaid these sums annually over an 11-year period before the National Income statistics were revised.

But the bad news for those of us who worry about the rise of Ukip is the angry way in which the prime minister has publicly reacted to the "demand" from the European Commission.

The fact is we owe the money under EU rules and one of the reasons why we are a net contributor to the Brussels budget is we are contributing to the financing of the east European economies for whose accession to the EU Britain fought harder than almost any other EU member.

Frightened of Ukip and his eurosceptical right-wing, Cameron seems to be moving closer and closer to an EU exit. And this from the leader of a party that fought for decades to win the right to join what was then called the European Community.

William Keegan is a journalist and academic who is the senior economics commentator at The Observer.