If the eurozone falls apart, it will be because Germany did not do enough to save it. If the eurozone is saved, it will be thanks to Germany. This is the greatest challenge to German statecraft since the country was peacefully united 20 years ago. At the moment, the leaders of Europe's central power are not rising to the challenge, but they still have a few weeks in which to show that they can. Thereafter, it may be too late.

We are now into act two of the eurozone crisis. Act one was the Greek tragedy, exacerbated by a German chancellor who prevaricated in the face of media and public opinion, furiously hostile to bailing out those feckless heirs of Oedipus, as well as concerns that Germany's constitutional court would declare a bailout illegal. It ended in dramatic negotiations in May, which produced what is, in all but name, a European bailout mechanism.

This temporarily assuaged the wrath of the bond markets, but the underlying problems in the peripheral economies of the eurozone remained. The mechanism was anyway only agreed till 2013. This autumn, still fearful of its own media, public opinion and constitutional court, the German government decided that something more durable is required. Scooping up the support of Nicolas Sarkozy's France, as a burly seaman might lift his floosie off her feet, Germany announced last month that a change to the Lisbon treaty would be needed, to make permanent arrangements for at once supporting and disciplining eurozone governments that got into difficulties on their sovereign debt.

As part of this German cure, investors would have to be prepared to take a loss – either a "haircut" or a debt swap – on those weak government bonds. In substance, and for the longer term, this must be right. One reason some countries on the eurozone periphery have got into such a mess over the last decade is that they could borrow so cheaply, since the markets did not believe there was a serious risk of sovereign default by any eurozone government.

However, the immediate effect of the announcement in October was to frighten investors away from buying more of those dicey government bonds. A haircut? No thanks. The German demarche thus precipitated this drama's second act, which has begun in Ireland. Now Nouriel Roubini's economic consultancy makes this compelling prediction for Portugal: "The script in the next few days and weeks in the markets will follow a similar pattern to Greece and Ireland – denial, more denial, EU confusion, market panic and a bailout." But there's still enough money in the post-May kitties, plus the IMF, to bail out Portugal.

The real crunch comes with Spain. I understand that the Spanish government hopes to borrow nearly €9bn before the end of December, and perhaps around €90bn next year. If the markets make that borrowing too expensive, Spain will be the next emergency. Then we would be in act three. The German Hamlet (an image, incidentally, used long ago by the German poet Ferdinand Freiligrath) would have to make up his mind. To be or not to be, that would be the question.

Since Germany's voters, media and constitutional court will not allow a largescale repeat of May's performance, there would only be two ways forward. The first would be for the eurozone to fall apart, with, one way or another, a Club Med/Celtic periphery and a Germany-centered, north European core ending up in different currency camps. Most Germans I talk to say the collapse of the eurozone is "unthinkable". This reminds me of a famous piece of German light verse about a man called Palmström who gets run over on a street where traffic is not allowed, and concludes that he cannot, therefore, have been run over because nicht sein kann, was nicht sein darf (what may not be, cannot be). But the man was run over – and the eurozone can collapse.

German leaders have now begun to warn against this in dramatic terms. Chancellor Angela Merkel recently told her party conference: "If the euro fails, then Europe fails." This is probably the right tone for her to adopt, although the statement is of course strictly untrue. Europe has been going for a good 2,500 years, and will doubtless carry on for a few more. But this would certainly be a grave blow to the European Union, to Europe's position in an increasingly non-European world, and to the German economy, which has benefited from the scale and stability of the euro, and from the fact that Germany's eurozone partners cannot competitively devalue.

The better alternative would be to save the European monetary union, by giving it the underpinning of a minimal form of fiscal union. The German government would contribute its weight to cross-guarantees of other eurozone governments' debts, in return for better fiscal discipline by the others – perhaps through a kind of European monetary fund.

Yet here is another horn of Germany's dilemma. For half a century, German politicians have repeated, like a mantra, Thomas Mann's call for "a European Germany, not a German Europe". It was in this spirit, and in the context of securing German unification, that the Federal Republic agreed to give up the symbol and anchor of its postwar revival – the mighty D-mark. As a wholly unintended result, it is now being driven, not by its own hegemonic ambitions, but by the interplay of the dynamics of a lopsided, incomplete European monetary union, on the one hand, and the pressures of its own increasingly eurosceptic public, on the other, to insist on what is – in effect – a German Europe. Or at least, a more German Europe: that is to say, one having greater fiscal discipline, with member states not piling up mountains of public and private debt.

Now in numerous respects, a more German Europe would be a better Europe. There are many things about Germany's economic model – its productivity, its consensual labour relations, its focus on product quality, its penetration of emerging markets – that other European countries would do well to emulate. However, it is also true that the entire eurozone cannot simply become one big Germany, both because the eurozone is composed of structurally, historically and culturally different countries, and because the rest of the world could not take the imbalance that would result from such a large chunk of the world economy having a German-scale trade surplus. So Germany also has to cut its partners some slack, and do something about lifting its own domestic demand. The right balance may be: 70% other eurozone countries become more "German", 30% Germany becomes less so. (Economists can argue about the proportions.)

In other words, for both economic and political reasons, there has to be a compromise. The challenge for German statecraft is to find this difficult but sustainable compromise, in the most intensive negotiations with all its European partners – and then to sell the result to its own reluctant people. The markets will not leave it much time. The future of the eurozone now depends on this German leadership. Come on, Frau Bundeskanzlerin, history is knocking at your door. And history only knocks once.