Helmut Rahn lived as a recluse for more than 20 years. When former friends phoned he told his wife, Gerti, to hang up. The couple's ground-floor flat on a quiet street in Essen was furnished as if they still lived in the 1970s, complete with brown carpets and clock-dial telephone. And when he ventured outside he headed either for the church or for the Friesenstube, a dark and gloomy bar just down the road.

Sadly, it was not until his death last August that Helmut Rahn, German football hero, came to life again. Over and over, television screens showed the striker's triumph as he swished past two Hungarian opponents and propelled West Germany to their World Cup victory on 4 July 1954, in Berne's Wankdorf Stadium. The goal that made a nation, some have called it. 'The Miracle of Berne' is how the game is known, well beyond the boundaries of modern Germany.

Since he died, after a long illness and one month before his seventy-fourth birthday, Rahn has rarely been out of the headlines. His funeral was screened live for more than two hours on state television and his passing triggered a nationwide debate about the meaning of the match. Older Germans relived their anguished memories of the post-war years and the euphoria of the unexpected triumph and the swift recovery of the West German nation in the 1950s and 1960s. Businesses were quick to cash in with an astonishing array of Berne memorabilia, swamping German stores with posters, books and T-shirts. Huge celebrations earlier this month marked the fiftieth anniversary of the game, and topping it all is the release of Das Wunder von Bern , a movie about the traumas of post-war Germany that culminates with the game in Switzerland. It has been favourably reviewed and is now showing in Britain.

Rahn's second goal, which clinched Germany's 3-2 win against Hungary, was scored six minutes before full-time. It put an end to the supremacy of the mighty Hungarian team, built around Ferenc Puskas, who had been unbeaten for four-and-a-half years. But for millions of people, the shot symbolically ended a much longer ordeal - the dark years of humiliation, grief and shortages suffered by many Germans after the defeat of Nazi Germany.

'Suddenly Germany was somebody again,' recalls Franz Beckenbauer, who in 1954 was practising his tricks in leather ski boots with sawn-off soles. 'For anybody who grew up in the misery of the post-war years, Berne was an extraordinary inspiration. The entire country regained its self-esteem.'

The film was meticulously researched. Horst Eckel, one of the three surviving members of the Berne squad, volunteered to advise the film-makers on the togetherness that enabled the German underdogs to struggle to victory against the favourites, who had thrashed them 8-3 earlier in the tournament. They rebuilt the Wankdorf stadium and its giant clock, which had been bulldozed many years ago, as well as the train that brought the team home to an extraordinary welcome, with millions of people lining the tracks.

All the actors are football fans, and more than decent players who skilfully re-enacted the Berne game themselves. The victorious goal was shot in just five takes. Sascha Göpel, the young actor who embodies the beefy Helmut Rahn, himself played in the youth team at Rot-Weiss Essen, the striker's club.

'My grandfather was very disappointed when I told him I was dropping football to take acting classes, but this was made good when he heard I would be Helmut Rahn,' says Göpel. 'I grew up hearing the stories about Berne and Rahn, the local lad whose shot helped Germans to cheer and to stand tall again.'

The movie has received huge acclaim from the German public. The country's political elite rushed to watch Das Wunder von Bern and Gerhard Schröder scored a few extra points when he declared, bleary-eyed at the exit of his local cinema, that he had cried twice. The outgoing national team coach, Rudi Völler, said: 'I've seen it three times. Boy, I really had a cry.'

The interest is partly explained by the excitement already taking hold around the 2006 World Cup, to be held in Germany, as well as the opening-up of discussions on the country's past. While the Germans are beginning to examine their own war wounds, the film looks at the soul-searching that caused considerable suffering after the defeat of Nazi Germany - highlighting the story of a soldier who returns from the Eastern front in tatters, unable to talk with his wife and despised by his teenage son. And as the movie suggests, Das Wunder von Bern enabled millions of Germans to put the gloom behind them.

The Federal Republic of Germany came into existence in 1949 with the adoption of a temporary constitution under the leadership of the conservative Konrad Adenauer. The Wirtschaftswunder that led to Germany's stunning economic recovery had more to do with intact industrial assets and American aid than with footballing skills. Yet several established historians, among them Joachim Fest, are in no doubt that the Berne game marked the psychological turnaround - sparking the energy and the sense of togetherness that were needed to build the new country. In his eyes, 4 July 1954 was 'the true birth date of the Bundesrepublik '.

The football victory that came to epitomise the new Germany bore many trademarks of the old one. From the trainer down to the boot-maker, the people around the German team had all done relatively well during the war and they certainly had not distinguished themselves by standing up for the democratic values that founded the Federal Republic.

The preparations for Berne started as early as 1938, when Josef 'Sepp' Herberger was alerted to the special talents of Fritz Walter, then an 18-year-old player in Kaiserslautern, who would become the 1954 team captain and still by far the most revered of the lot. Herberger, a wily man with a wrinkled face who had been picked as national team trainer by the Nazi sports authorities, spent much of the following years grooming his favourite player, a kind of surrogate son, for the leadership of a national side.

The fact that football was used as a propaganda tool for the Nazi regime, both at home and abroad, did not seem all that relevant to Herberger, who joined the Nazi party in May 1933, apparently encouraged by friends as well as the party's tentative policy to take control of all sports organisation.

The invasion of Europe thwarted his plans to piece together a decent team, as most of his protégés were sent off to the front. He had to take substantial risks to get 11 able-bodied players on to the pitch. On several occasions he made up military distinctions for his players to show that they had contributed to the war effort, and he had several players transferred to an air-force division. In the case of Walter this raised some eyebrows, since the young soldier had never seen the inside of an aircraft. The point was that the air-force unit was run by a football friend, the well-known fighter pilot Hermann Graf, who would protect Walter and make sure he had plenty of practice.

This relative safety was shattered when the US Army moved in towards the end of the war. Instead of fleeing, Walter's unit fought and most of its men were captured, later handed over to the Red Army and sent off to Siberia. But the future champion was spared again, this time by football-loving guards at a Ukrainian transit camp. They postponed his departure to the steppes when he casually joined one of their games and displayed some of his skills. As Walter wrote later, he then befriended the camp chief and told him that his home town of Kaiserslautern was under French supervision. The chief concluded that Walter was French and sent him back home.

After some umming and aahing, the denazification committee in Herberger's town more or less cleared him by classifying him as a Mitlaüfer (a follower who joined Nazi organisations but did not actively collaborate) and the German football federation had to admit he was still the best-qualified person for the job.

Herberger had to struggle with reluctant officials and an acute shortage of equipment. As millions of people with bombed-out homes scraped for a living, along with millions of refugees from the Eastern territories, football did not rank very high on the list of priorities. Most of the authorised clubs and players had to take care of their own equipment - sometimes using discarded Nazi banners, with swastikas removed, as shirts and corner flags.

And then, Herberger still had to find suitable partners for Fritz Walter. At least two potential members of the squad had died at the front, others had been injured, and nearly all had gone through dreadful ordeals. One of those was Ottmar Walter, the younger brother of Fritz, who was among the 29 survivors after his ship was ambushed near Cherbourg. He was rescued by German support vessels as scores of his shipmates drowned around him.

'My entire body was full of shrapnel,' remembers the 79-year-old Ottmar Walter. He was recuperating from surgery in Brest when the Americans landed on the nearby coast of Normandy. Still, when he returned towards the end of 1946, after two years in American and British POW camps, he was in much better shape than most of the German soldiers who surrendered on the Eastern front. Ottmar Walter, remarkably, would play as a centre-forward.

One of Herberger's wildest bets was Rahn, the boy from Essen. Unlike many of the others he had been relatively untainted by the war: because he was too young to fight, and his father was allowed to stay at home to deliver coal on a horse and cart. An electrician by trade, Rahn was a talented right wing at Essen, a light-hearted lad and a bit of a hothead. Herberger described him as 'a genius at positive improvisation, who never ceases to surprise us'.

With scores of flowery balconies and romantic arches, the Hotel Belvedere in Spiez, Switzerland, offered wonderful views of Lake Thun. But for Herberger, the secluded setting was essentially meant to cement his team.

One of Herberger's smartest tactics was in picking room-mates. In most cases he picked men from the same region or with the same affinities, but for Fritz Walter he needed a special companion. To soothe the nerves of the shaky captain, who suffered regular bouts of uncertainty, the trainer could think of no better distraction than Rahn. Conversely, Walter was exactly the right person to rein in the wild boy from Essen. As Ottmar Walter observed, it worked perfectly: 'Helmut was such a clown that my brother always arrived for breakfast with tears of laughter in his eyes. He just didn't have the time to get nervous about anything.'

The preliminary round got off to a reassuring start for Walter, as Germany hammered Turkey. This encouraged Herberger to field a second-string team for the second match against Hungary, which proved a bad miscalculation - they lost 8-3.

The next day, the players struggled to retain their composure as Herberger read out some of the demeaning telegrams and press reports he had received. Perhaps that stimulated the Germans in their decisive third game, a rematch against Turkey - victory put them into the knock-outs.

The pundits still did not know what to make of the team. Their battering at the hands of the Magyars was fresh in everyone's minds but the Germans continued to display unwavering self-confidence. Herberger's press conferences were well worth attending, as he delighted reporters with profound football comments, among them: 'The game lasts 90 minutes'; 'After the game is before the game'; and, most famously, 'The ball is round'.

The Germans progressed confidently towards the final (while England, led by Stanley Matthews, lost to Uruguay in the quarter-finals). They had a straightforward win over Yugoslavia and, fired up for the semi-final, defeated a strong Austria side 6-1. As they left the pitch many felt that they had done more than their duty - it had been an extraordinary achievement to reach the final and the best they could do against Hungary was to avoid another humiliating defeat.

For the final, the Germans wanted rain, which would neutralise the skills of the Hungarians - among them Puskas and Nandor Hidegkuti. The skies remained blue in the morning, but as the players departed for the stadium, they were ecstatic to feel the first drops of a steady downpour. 'Fritz Walter weather,' Herberger said, was what the Germans needed most.

The time had come for Adi Dassler, the Bavarian shoe-maker who set up Adidas, to play his part in 'The Miracle'. As Dassler revealed to his friend Herberger before the start of the World Cup, he had just come up with a technical invention that became known as removable studs - to be screwed on or off depending on the state of the pitch. 'Adi, screw them on,' Herbeger instructed, as it became clear that the Wankdorf pitch would soon be soaked.

The final could not have started worse for the Germans, with Puskas and Zoltan Czibor scoring within eight minutes of kick-off. At 2-0 down, a second humiliation seemed likely. But Walter and his mates continued to fight and were soon level, Max Morlock and Rahn both scoring before 20 minutes had passed.

As the pitch turned to mud in the second half, their studs gave the Germans an undeniable advantage. They were also helped by increasing tensions among their opponents. 'After half-time they seemed irritated, they started barking at each other and their game became disorganised,' Ottmar Walter recalls.

But it was Rahn's shot that proved decisive. The radio commentary was exploited in a best-selling record and many football enthusiasts can still recite it word for word. The voice of Herbert Zimmermann changed from matter-of-fact description to high excitement.

'Schäfer delivers a cross into the box. Header, cleared,' he comments, still calmly, before the ball lands at Rahn's feet. 'Rahn should take a deep shot, Rahn shoots. Goal! Goal! Goooal! Gooal!' Zimmermann shrieks. After a moment of stunned silence he tries to capture the madness of it all. 'Germany lead three to two, five minutes before full-time. Call me mad, call me crazy!'

After the last nerve-racking minutes, hundreds of delighted fans swarmed on to the field and scenes of boisterous elation erupted all across Germany. Even the East German broadcaster at the stadium was unable to contain his excitement.

Some of the fans forgot themselves. Although the surviving players said they did not notice, others were aghast when they heard the infamous first verses of the forbidden German national anthem, Deutschland über alles , rising from the crowd. The diplomatic explanation was that the offenders got carried away and could not remember the new version. No excuse could be found, however, when Peco Bauwens, head of the German football association since 1950, made a chilling speech for the players at the Löwenbräukeller in Munich, which was promptly cut off by Bavarian broadcasters. As Bauwens saw it, Herberger and his men had been 'representative of perfect Germanness'. He was even quoted as using the word ' Führerprinzip '.

At the victory banquet, Herberger and Fritz Walter briefly left the dining room to hold talks with German league officials. The captain returned with a triumphant smile and excitedly told the others that they would all obtain a bonus of 1,000 Deutschemarks - a tidy sum, but not enough to buy a car. The most gratifying part was the return to Germany, when hundreds of thousands came to hail the players. In the smallest stations, platforms were jam-packed with men, women and children who shouted the players' names and threw packages at them. The team, admirably well-organised, had kept an entire carriage empty for the goodies and agreed on a method to share them upon their arrival.

The welcome was particularly delirious for the Walter brothers and three others from the squad in Kaiserslautern, where the streets were clogged for hours.

'There was an overwhelming feeling of elation and gratitude,' recalls Ottmar Walter. He soon had to end his career due to the injury he sustained during the war, but Fritz played for many more years in the Kaiserslautern stadium that bears his name.

To many connoisseurs, Fritz Walter remains the most complete and endearing German footballer of all - some rate him higher than Beckenbauer. Respect for him takes on another dimension.

'Fritz Walter was a great football player but to many people he was much more than that,' says Miroslav Klose, the FC Kaiserslautern and Germany striker. 'Whatever happens at the next World Cup, it's obvious that we could never again achieve anything of the same magnitude as that victory in Berne.'

Klose, a thoughtful 25-year-old who cultivated personal contacts with Walter, heard the Berne story from his parents many years ago. After the release of Das Wunder von Bern , many other witnesses recalled the euphoria unleashed by the game and the feeling that Germany had become a respectable member of the international community again. They remembered precisely what they were doing that day. And in some families the movie has triggered long-overdue discussions about post-war Germany.

Tom Spiess, the film's producer, has received umpteen letters from old folk who took their grandchildren to the movie. 'Most of them are grateful for the opportunity to talk about the reconstruction and the depression that accompanied this period, when the Germans no longer knew who they were and what to believe,' explains Spiess, 42. He heard the Berne story from his grandmother, who lived in the Eastern part of Germany, then supervised by the Red Army.

'For as long as she could remember she had been told what to think, first by the Nazis and then by the Communists,' Spiess recalls. 'For her, Berne was about self-confidence, the simple joy to be proud without feeling guilty again.' Later he was told that the Federal Republic had three founding fathers: Konrad Adenauer for independence, Ludwig Erhard for the Wirtschaftswunder (economic miracle) and Fritz Walter for self-confidence.

The only German player who did not fare so well from the Berne miracle was Rahn. Just like the others he was treated to a hero's welcome in Essen; wherever he turned up people begged him to recount that decisive goal, again and again. But Rahn's behaviour became increasingly erratic and he acquired many dubious friends.

'The kind of friends who expected him to buy all the rounds,' explains Paul Nikelski, the former manager of Rot-Weiss Essen. Nikelski was not surprised when Rahn steered his car into a construction site on a particularly humid night. The young man apparently rebelled against the policemen who had come to pick him up and found a more than unhealthy level of alcohol in his blood - enough to land him in jail. At the end of his career he briefly teamed up with his brother to run a garage and retired to his flat with Gerti.

Among the hundreds of mourners at his funeral last year was the region's prime minister, a football enthusiast who aptly summed up the mood.

'Helmut Rahn achieved something extraordinary,' he said. 'He belongs to the story of our reconstruction, forever embedded in the nation's consciousness.'

Barbara Smit, whose last book was a history of Heineken, is currently writing the story behind Adidas and Puma, to be published next year.

You can mail the Observer direct at < A HREF = mailto:sport@observer.co.uk >sport@observer.co.uk< /A >