The eurozone crisis has reawakened old ghosts - in particular, the ghost of German mastery in Europe. In Athens, anti-German feelings have been running high for some time and it is not only protesters who reach back to the era of the Nazi occupation for analogies with the present. European Union officials in Greece are likened to the Gestapo; Greek ministers are lampooned as collaborators. Is this a temporary blip or a sign of something deeply awry?

One thing to bear in mind is that the connection between Greece and Germany goes back a long way - much further than the war. German liberals flocked to the Greek cause when the war of independence broke out in 1821. Greece's first king, Otto, was a Bavarian and his administration - with its imported technocrats and policemen - was pretty unpopular at the time, so unpopular that he was eventually kicked out and replaced with a Dane. That unpopularity is long forgotten; indeed, when a German, Otto Rehhagel, led Greece's football team to victory in the 2004 European Championship, he was affectionally dubbed "King Otto" in the national press. Before the Second World War, Germany was seen very positively as a cultural and intellectual magnet and many of Greece's most illustrious painters, photographers, archaeologists, doctors, lawyers and bankers were educated there.

As in so many places, Nazism and the Second World War broke this rich web of ties and connections and replaced the varied memories of the past with the violence and trauma of the occupation. No crisis in Greece's short history - and there had been many - could compare in terms of mortality or, perhaps even more importantly, of the shock of these years. The state collapsed, famine carried off thousands and the subsequent social breakdown and political vacuum opened the way for a resurgent left to take leadership of the resistance to the occupier.

The liberation marked less the definite ending of hostilities than it did the transition from one kind of partisan war to another. The left, both communist and not, was not only crushed. It was persecuted for decades to come - Stone Years was the title one film-maker gave to a portrayal of this period - and when the colonels seized power (and Washington turned a blind eye) in 1967, it seemed to many inside and outside Greece that the right-wing anti-communists who had prospered helping the Germans in the early 1940s and then the Americans in the late 1940s had come to power again.

The memory of the war did not end with the collapse of the junta in 1974. On the contrary, while Greece finally established a stable two-party system, some on the revolutionary left behaved as if they were still in the wartime resistance, struggling against fascism by assassinating CIA operatives, newspaper magnates and prominent businessmen. The rhetoric of the best-known of these - the 17 November terrorist group - was suffused with references to wartime and the rather broad tolerance of its activities suggested that while mainstream Greek public opinion did not fully accept the idea of an enduring occupation, something in that memory remained appealing.

All of this was premised on the view that the Americans - and to a lesser extent the British - had taken over the mantle of domination from the Germans. So far as Germany itself was concerned, for decades, it rarely made the headlines except as a destination for Greek men looking for work. Greece was the second country after Italy to sign a labour recruitment agreement with Bonn, in 1960, and perhaps as many as a million Greeks emigrated there. (Not that many stayed: there are well over half a million Greeks living in Greece today who spent time in West Germany before returning home.)

One consequence of the German economic miracle was that it allowed the war to be forgotten, often in some fairly deliberate ways. At the end of the 1950s, a notorious war criminal, Max Merten, who had run the military administration of Thessaloniki, was arrested on a trip to Greece. This event rapidly escalated into a diplomatic embarrassment not only for the Adenauer government but for the Greek conservative prime minister Konstantinos Karamanlis. Karamanlis was in the middle of negotiating Greece's first association agreement with the common market. The freeing of Merten - who was sent back to West Germany - from a Greek jail became the price of securing Germany's backing.

This all-too-revealing episode was quickly forgotten and remains unknown to most people today. They are much more likely to be familiar with the so far unsuccessful legal battle to get German compensation for survivors of the massacres that took place in several Greek villages during the war. When anti-German sentiments re-emerged in Greece last year at the onset of the eurozone crisis, they did so with little warning. This is not to say that their emergence was especially surprising. Much of the Greek anger was reactive, prompted by a series of newspaper articles and cartoons in the German press that portrayed the Greeks as profligate and suggested, only half tongue-in-cheek, selling off its islands and antiquities to raise money.

Anthropologists will tell you that modern Greece is a culture founded on the value of filotimo - of pride and a sense of honour. In truth, it was not merely that the national honour was being outraged. It was rather that, as happens with warring couples, arguments over money were standing in for other problems and issues.

Morality tales

On the Greek side, bankruptcy means that people feel that the country is no longer in control of its destiny and this is a feeling with a long and uncomfortable history of its own. During the Second World War, the crisis of the state was a crisis of sovereignty; Axis occupation was the ultimate revelation of vulnerability and dependence on the will of others.

The spectre of default today raises very similar anxieties, albeit in less dramatic form. Is the country simply to be seen as a collection of assets to be sold off in a fire sale? Has the political class ceded all authority to Brussels or Berlin? Much of the anger with Germany expressed the humiliation of a society that believed that it had finally banished the ghosts of the past and the memory of its peripheral status in Europe, only to find this achievement called into question.

Tell any German that they are behaving today as they did in the war and they will be, quite understandably, outraged. There is, after all, no small difference between the early 1940s, when the occupation simply bled Greece dry and plundered it of its resources with worthless occupation currency, and the crisis today, in which Germany is providing large sums to Greece and being asked for more. Even if these sums are mostly going straight into the European banks to help them stave off bankruptcy, the fact remains that the aim of this policy is not to reduce Greece to penury and starvation but to keep it within the euro.

However, Chancellor Angela Merkel's insistence on continued austerity may indeed be reducing Greece to penury. In a curious way, the memory of the war has continued to shape German behaviour through this crisis just as much as it has the Greek. For, if Germans are outraged at endless invocations of the war, it is because they feel that they are trying to act exactly as the Nazis did not.

Educated over generations to see the assumption of leadership in Europe as something that brought both Germany and the continent to the brink of ruin, Germans today are deeply reluctant to assume the responsibilities of hegemony. Instead, they intone the mantra of living up to the rules. If the south Europeans can't abide by the agreements that they signed up to, they will have to learn to do so or leave the eurozone. Leadership of Europe thus becomes little more grandiose than a question of enforcing club discipline. It is, in its way, a kind of antiwar vision of continental leadership, one that is much more comfortable with talk of fiscal norms and legal obligations than it is with anything so crass as power or domination. Put it to Berlin that there is another vision of hegemony that they have lost sight of - one that is not about sending in the tanks but rather about acting as lender of last resort, recycling surplus capital and providing the social goods for the collective that no one else can supply - and one is met with bewilderment.

The consequence is that memories of the war still bedevil national responses to the European crisis today. Greek demonstrators turn themselves retrospectively into resistance fighters and thereby craft a moral counter-narrative to the north European charges of profligacy and corruption. What is more, many of them believe it. German lenders see themselves as cooperative, restrained and helping to uphold commonly agreed principles and policies, thereby shaping their own morality tale of economic virtue, which contrasts comfortingly both with the less self-disciplined behaviour of the south Europeans and with the exploitativeness of the Nazis.

It is not inevitable that these two self-serving visions will bolster one another. Plenty of people in Greece know - some of them even remember - the difference between Adolf Hitler and Angela Merkel. And anyone familiar with the history of Balkan antagonisms knows how quickly supposedly deep-rooted hatreds vanish or become irrelevant. Nothing, perhaps, would do more to alter the climate of opinion than an opening up of German policy towards a strategy for growth.

In October, the German economics minister, Philipp Rösler, invoked the "spirit of solidarity" as he arrived in Athens, accompanied by a small army of businessmen and investors. It was a rare appeal to a value that has generally been overshadowed by the preaching of austerity. Unfortunately, since then, Merkel has ridden roughshod over calls from her own advisers for a much more expansive approach to the buying up of Greek debt, so the prospects are not good for a turn to growth.

Greece now has a national unity government under an unelected economist. The bizarre sequence of events that followed George Papandreou's surprise announcement that Greeks would be allowed to vote in a referendum on the debt package brought home more sharply than anything previously that Greek politicians were no longer masters in their own house. It does now seem that the travails of the eurozone have produced a crisis of democracy in countries such as Greece and Italy. Not only do these countries face increasingly intrusive oversight of their economic management and policies but the markets have forced aside elected politicians in favour of Eurocrats.

Don't look back

What seems in this situation to be of paramount importance - and where the history can help - is to work out how the current crisis of democracy compares with those of the past. The Second World War and the Axis occupation that came with it certainly represented a collapse of state power in Greece. But this collapse was triggered not, as happens now, by the pressure of global financial markets and their impact on European welfare systems but rather by the cataclysm of Europe's ideological polarisation and interstate competition.

Viewed in this perspective, we are living in entirely new times, ones that have almost nothing to do with the Second World War. The threat to democracy no longer comes from fascism or communism or from the clash of rival imperial ambitions. None of these things counts any longer for very much. In different ways, they have all - at least, so far as Europe is concerned - become matters of historical curiosity. The absence of armies in the entire unfolding Euro-saga is so obvious to us that we ignore its historical meaning.

For the first time since Europe achieved a kind of consciousness of itself, military force has ceased to play a decisive role in the continent's political evolution. Our troubles are caused by an addiction - an addiction to cheap credit that was fed by the demands of consumers, voters and politicians and enabled by the greed of bankers and the deliberate liberalisation of financial flows of the past 30 years. If grappling with the ghosts of the past may offer a kind of false comfort, it will certainly not help understand the mess we are in now.

Mark Mazower is professor of history at Columbia University, New York. His books include "Dark Continent: Europe's 20th Century" (Penguin, £12.99) and "Inside Hitler's Greece" (Yale University Press, £14)