BERLIN — A last-minute jaunt to Davos; an "up yours" speech to Donald Trump in Munich; an unannounced visit to a Jewish restaurant in an eastern German city recently overwhelmed by right-wing violence.

Welcome to Angela Merkel’s farewell tour. The big question now is how long it will last.

Anyone who needs further confirmation that Merkel is over it after nearly 14 years as German chancellor needn’t look any further than her weary-looking appearance at this year’s carnival celebrations.

Not even Emmanuel Macron is pretending anymore. Instead of addressing his latest grand vision to “chère Angela” or including her in his initiative, Macron decided to go it alone.

Merkel signaled when she gave up the leadership of her party in December that she intends to remain chancellor until the end of the current legislative period, which expires in the fall of 2021. But since then it’s become increasingly clear that the government is unlikely to survive that long.

For some insiders, the government’s collapse is more a question of “when” than “if.”

That reality has less to do with Merkel’s own fatigue and the new power dynamic in her party than the Social Democrats (SPD), her junior coalition partner.

The SPD’s decision to join a coalition last year with Merkel’s Christian Democrats (CDU) left the center-left party divided. Ever since, the SPD has struggled to reverse a historic collapse in support and has even fallen behind the Greens in some polls.

With a number of important elections on the horizon in the coming months — the European Parliament vote and a regional state ballot in Bremen late May, followed by a string of regional polls in eastern Germany in the fall — Berlin’s political strategists are already preparing for what comes next. Many predict a new general election in the medium term.

If the SPD were to leave the government before the end of the regular term, a new election wouldn’t technically be necessary. The CDU and its Bavarian sister party, the CSU, could form a new coalition with the Greens and the Free Democrats. Yet it’s unlikely the Greens, now riding high in the polls, would go along with such a plan when a new election would likely bring them more seats in the Bundestag.

A poor showing for the SPD at the ballot box in the coming months, which current polls suggest is likely, could hasten the government’s collapse amid pressure from within the party’s ranks to seek renewal in opposition. A common critique of the SPD is that after years of governing with Merkel, the party has become almost indistinguishable from the chancellor's CDU.

For some insiders, the government’s collapse is more a question of “when” than “if.”

“I don’t expect the coalition to survive the fall,” a senior CDU official said.

Bracing for Bremen

It may not even last that long. One possible trigger is Bremen. An SPD stronghold in the post-war era, the city-state stands a fair chance of falling to the CDU for the first time, according to recent polls.

If the SPD can hold Bremen and forestall a collapse in support in the European election, it may survive until September, when it faces elections in the eastern states of Brandenburg — where it currently leads the government — and Saxony.

A loss of Brandenburg, where the SPD is polling neck-and-neck with the CDU and the far-right Alternative for Germany (AfD), could also trigger the federal government’s collapse.

The SPD is turning to the left on fundamental issues, a fact that will put further pressure on the coalition.

The key, leading Social Democrats say, will be to show at least some progress in the coming elections. The party won just 20.5 percent of the vote in the 2017 general election, its worst ever score, and now regularly polls below the 20 percent mark.

In recent weeks, the party has unveiled a string of initiatives aimed at reviving its socialist credentials. It has proposed overhauling state retirement benefits, for example, by introducing a “basic pension” to support those who receive only modest monthly payments despite decades of work.

The party also wants to improve unemployment benefits, doing away with the so-called Hartz IV regulations, a set of controversial labor market reforms introduced under SPD Chancellor Gerhard Schröder in 2005.

For many Social Democrats, Hartz IV, which ended decades of generous German unemployment rules, is a symbol of the party’s betrayal of its socialist roots.

Needless to say, the SPD proposals have run into tough resistance from the Christian Democrats, who have accused their partners of indulging in socialist fantasies. Alexander Dobrindt, a senior official in the CSU, dismissed the plans on Tuesday as a “therapy package” for the SPD.

In their coalition agreement, the parties agreed to maintain Germany’s balanced budget, a goal that would likely be jeopardized by the SPD’s latest proposals. Though Germany has run a budget surplus in recent years amid robust economic growth and tax revenue, economists caution that those days are likely to end soon.

German Finance Minister Olaf Scholz, who is also an SPD deputy leader, has warned that tough budget decisions lie ahead, while also suggesting that social spending should take priority.

“It is important to note that Olaf Scholz is the finance minister of the Federal Republic of Germany and not a minister for the SPD’s Good Feeling Program,” CDU Secretary-General Paul Ziemiak warned in an interview published on Tuesday. He added that the CDU “wouldn’t stand” for cuts in other areas, such as a security, where Germany has committed to increasing its defense spending.

Such coalition conflicts aren’t uncommon, especially in the run-up to an election season. Nonetheless, it’s clear that the SPD is turning to the left on fundamental issues, a fact that will put further pressure on the coalition.

The more time passes, the more difficult it could become for Kramp-Karrenbauer, as she learned the hard way this week.

So far, Merkel has remained quiet on the simmering coalition conflict. Indeed, the chancellor has been largely silent on most domestic issues since handing control of the CDU to Annegret Kramp-Karrenbauer in December.

The transition of power from Merkel to Kramp-Karrenbauer is another important factor in the calculus of when to pull the plug on the current coalition. Some in Berlin argue that the sooner the current government collapses, the better for Kramp-Karrenbauer.

A full term for Merkel could leave the party leader tainted by the shortcomings of the current government, they argue.

Conversely, a quick election would allow to her argue that she would bring a fresh face and approach to the job of chancellor.

The more time passes, the more difficult it could become for Kramp-Karrenbauer, as she learned the hard way this week. A carnival routine, in which she joked that third-gender bathrooms in trendy Berlin are for men who don't know whether to stand or sit at the toilet, opened her up to criticism that she is insensitive to intersex and transgender people.

The episode also illustrated that Kramp-Karrenbauer has begun to feel more comfortable in her role and in distancing herself from Merkel, with whom she’s often compared. And while the carnival skit might not have gone down well in Berlin, it likely pleased the CDU’s rural base, which has felt marginalized under Merkel.

Just as the SPD faithful want the party to sharpen its traditional socialist credentials, so many conservatives yearn to move to the right to recover ground they lost to the AfD under Merkel’s centrist course.

“Such a thing wouldn’t have happened to Merkel,” wrote a critical commentator of Kramp-Karrenbauer’s performance at carnival.

Yet that may have been precisely the point.