ON SUNDAY Martin Schulz declared that he would sign no coalition agreement that did not introduce equal marriage in Germany. The Social Democrat (SPD) chancellor candidate was not alone. The Greens and the free-market Free Democrats (FDP) have made similar pledges. At “Brigitte Live”, an event hosted by a lifestyle magazine in Berlin, last night Angela Merkel was asked where she stood. Germany’s chancellor had previously rejected equal marriage. In 2005 she told an interviewer: “man and wife, marriage and family, stand at the centre of our social model, so other lifestyles should not receive comparable constitutional protections.” But this time she called the issue a “question of conscience”.

At an SPD press conference this morning Mr Schulz asked how the chancellor could deny MPs a choice over such a “question of conscience”. He announced that the SPD would table a vote on an equal-marriage proposal, brought in 2015 by the SPD-FDP-Green government of Rhineland-Palatinate. This afternoon Mrs Merkel released her parliamentary party from its constraints. It looks entirely possible that the Bundestag will back equal marriage when it votes on Friday.

The events of the past 48 hours lay bare the way Mrs Merkel runs Germany. That the chancellor still dominates her country’s politics after 12 years at its helm is impressive. Six golden rules underpin her success:

Learn from past elections. Mrs Merkel’s political method is a compendium of lessons acquired during past encounters with the German electorate. In 2002 her party was outflanked by a centre-left chancellor (Gerhard Schröder) willing to rail against a right-wing American president; today she pointedly distances herself from Donald Trump. In 2005 the CDU’s small-state tax plan almost cost her the chancellorship; since then she has never strayed from the economic centre. In 2009 she successfully ran on a platform of stability, then redeployed this in 2013 and in the current electoral campaign. In a TV show during the 2013 campaign Mrs Merkel was eloquently skewered by Patrick Pronk, a prospective CDU voter who wanted to know why she would not let him adopt a child with his male partner. The chancellor waffled, concluding: “I struggle with this. I know I cannot fulfil your hopes”. She seems to have learned from this awkward moment, and thus moved to close off gay rights as a cause of difficulty during this campaign.

Constantly revisit your past positions. Mrs Merkel is not a liberal. She is a Christian democrat. So her past opposition to equal marriage and to adoption by same-sex couples was probably sincere. But for one who has held Germany’s chancellorship for 12 years, she travels light and little burdened by previous policy commitments. One critic, Gertrud Höhler, claims that Mrs Merkel runs Germany as a permanent focus group; trying out new policies and ideological propositions as frequently and casually as a grocer tests new products on his shelves. To Ms Höhler this betokens a values-free opportunism, but to the chancellor’s supporters it speaks of Mrs Merkel’s sensitivity to the changing needs and attitudes of her electorate. Either way, the chancellor used her turn on “Brigitte” to explain how a meeting with a lesbian couple in her Baltic Sea constituency changed her perspective. The chancellor has honed the art of u-turning in style.

Do not move faster than public opinion. Mrs Merkel obsessively commissions and consumes polls. Her political genius is to anticipate shifts in opinion at certain dramatic moments, but also to judge when a long-term shift has reached the point of general acceptance. Allensbach, a polling agency, suggests that the number of Germans backing equal rights for homosexuals first exceeded the number opposing them in about 2010 (Germany lags behind most western European countries on measures of social liberalism). Today about two-thirds of voters back gay marriage. The chancellor has swept in behind this shift, as is her wont.

Close down reasons for people to dislike you. In the Anglo-Saxon world it is typical to think of election campaigns as being about persuading people and making them like you. This ignores another side of campaigning: lowering the turnout of people who support your opponents. Mrs Merkel excels at this, to the frustration of the SPD. At the party’s pre-election conference in Dortmund last Sunday Mr Schulz termed this “asymmetric demobilisation” an attack on democracy. Yet this week Mrs Merkel’s shift on gay marriage neutralised another subject that might otherwise have motivated social liberals to go to the polls in support of her opponents.

Triangulate endlessly. Last month Mrs Merkel spoke at a women’s summit in Berlin, linked to Germany’s G20 presidency. She was asked whether she was a feminist. Most politicians would have said yes or no and done their best job of explaining their position. But the chancellor merely invited delegates to vote on the matter. She refused to define herself. Look, too, at her position on Europe. In the coming election the chancellor needs to compete with a keenly pro-European rival without offending more nationalist voters. The CDU slogan is a study in triangulation: “a strong Europe means a strong Germany”. Pick almost any debate in Germany today—eurozone integration, defence spending, tax cuts v spending increases—and you will find Mrs Merkel almost exactly half-way between the two poles of the debate. This is the foundation of her political success. Whatever the subject, she owns the interstitial terrain in which compromises are forged. By giving a free vote on gay marriage but not endorsing it, she is doing that just one more time.

Move fast when events demand it. Mrs Merkel is typically ponderous and reflective. In colloquial German, the verb “merkeln” now means “to prevaricate”. Yet the chancellor can make sudden moves, bolting to close off rivals’ political territory. She did so in 2011, when the Fukushima disaster prompted her to close down all of Germany’s nuclear plants; and in 2015, when she decided to keep the country’s borders open to refugees. She did so again today. Within 24 hours of the SPD’s announcement on gay marriage, she was signalling a shift. Within another 24 hours she had executed it. An SPD stance that might appeal, for example, to the sorts of voters loosened from the struggling Greens suddenly lost its distinctiveness.

These six laws illustrate the cases for and against Mrs Merkel. To her supporters, her responsiveness to public moods and her mix of caution and opportunism make her an exemplary democrat. She constantly calibrates and recalibrates, in a way that voters expect of their politicians. In this scheme one might ask: is it presumptive of a politician to impose gay marriage on a country before it is ready?

Yet the answer is surely “no”. It is not presumptive to expect a figure as powerful as Mrs Merkel to strive for something as fundamental as the universal right to marry. And herein lies the criticism of her method. To lead is not just to hedge for years, then move once your electorate has done so organically. It is also to shape opinion, edit the rules of the game one is playing and make change happen. Mrs Merkel’s shift on gay marriage is welcome and a neat illustration of her strengths. That it comes so late is a parable of her limitations.