Germany has prospered through the best of times. now, it must navigate what are shaping up as the worst. next month it celebrates the 30th anniversary of the fall of the berlin wall. amid a rising sea of international discord, germanys peaceful reunification has been a triumph for liberal democracy and an anchor of political stability. now, the global order that made it possible isdisappearing over the horizon.

Cast around for descriptions of todays germany and responses usually include prosperous, steady, moderate. some may add smug, and there will always be some uk brexiters who live the nightmare of a fourth reich. in troubled times, however, europes most powerful nation is defined by its stability a national resilience rooted in rejection of extremes.

Of course, germany has its dark corners. it has not been immune to the economic and social divisions challenging political elites across europe. it has its own populists alternative for germany on the far-right, linke on the far-left. those who assumed german capitalism always played by the rules have been startled by the environmental frauds perpetrated in its legendary car industry. admirers of its unmatched engineering prowess struggle to explain a crumbling national infrastructure.

By the same token, reunification has thrown up disappointments. the vast investment poured into the former german democratic republic has not erased the line between east and west. leipzig and dresden have been reborn as great cities, but the east has failed to attract self-sustaining private businesses. the best and brightest head west. a generation of left-behinds still hanker for communist certainties. ostalgia, it is called.

All these challenges are relative. most other european governments would not hesitate to swap berlins problems for their own. in an era of popular disenchantment, what stands out is the high level of trust in germanys political and civic institutions trust that underpins a capacity to absorb unexpected shocks.

The opening of the borders in 2015 to 1m migrants from syria and beyond looked for a time as if it might overwhelm chancellor angela merkels administration. the far-right in the shape afd gained a firm foothold in the bundestag. the subsequent process of integration has not been perfect, but the crisis has long passed smothered by the high levels of civic engagement that mark out germanys federal system.

The response to the covid-19 pandemic has illuminated the same careful proficiency. responsibility has been shared between the various tiers of government. citizens have been engaged. germanys infection and mortality rates are the lowest of europes big countries.

So why fear the worst of times? for 40 years, history was on germanys side. now, the external stability on which it built domestic success has been replaced by the most significant geopolitical uncertainty of the postwar era.

The us presence in europe guaranteed the continents security. the wisdom of bonns political leaders in facing up to the horrors of nazism created a shelter behind which germany could rebuild its economy while entrenching democracy.

Franco-german reconciliation and the creation of the eu pulled in the same direction towards a rules-based system in which the social market economy flourished. the bargain suited all sides. fear among neighbours of german rearmament left responsibility for security and the burden of defence spending to the americans, the french and the british.

For a more than a decade after the wall fell, germans could tell themselves that this conjunction would last for ever. the german model of normative power would serve alongside us military might as a guardian of unification. as former chancellor helmut kohl used to remark: for the first time in our history we are surrounded only by friends.

This was the walled garden behind which the republic flourished. to be fair, germans were not alone in thinking the world had reached the end of history. never mind. real life has turned out otherwise.

Vladimir putin's russia has re-emerged as a revanchist power, seeking to redraw national borders by force. china has repudiated the western model in favour of state-directed capitalism attached to political repression. the us has turned inwards as china pushes outwards. nationalism has returned to europe. this is the world of 19th century power plays rather than the co-operative internationalism of the second half of the 20th.

Germany's leaders have mostly understood this. frank-walter steinmeier, the former foreign minister and now federal president, has spoken eloquently on the need for germany to take on its share of the security burden. the ultra-cautious ms merkel habitually offers a rhetorical nod in the direction of a bigger german role in upholding the rules-based order.

Yet there is little sign yet of a corresponding change in the national mindset. at times of crisis, germanys first instinct is to mediate. in a world where too many others prefer to shoot first, that is no bad thing. but whether it is russian aggression, turkish adventurism or chinese expansionism, the new global disorder presents unavoidable choices. there are times when nations germany included have to take sides.