If there is one European country that wants more of the same from Germany after the federal election on September 22, it is Poland. Relations between the two countries have been a rare beneficiary of the euro crisis. After a low point in 2005–2007, when Poland’s right-wing Law and Justice government spent a lot of time and energy attempting to give Germany a bloody nose in Europe, ties between Berlin and Warsaw are now widely regarded as being at their peak.

An alliance of personalities has helped. Donald Tusk, Poland’s prime minister, is a political twin of German Chancellor Angela Merkel. He is a cautious pragmatist who avoids making tough decisions and basks in the light of the extended center ground he has constructed. Although somewhat scarred in the latest opinion polls, Tusk remains the most potent figure on the country’s political scene, as Merkel does in Germany.

Broadly speaking, Germany’s main political parties do not differ substantively on relations with Poland. Merkel’s main challenger ahead of the German election, Peer Steinbrück of the Social Democratic Party, has focused his campaign on the “quality of work” and a stronger social safety net—issues that have set him apart from the Polish prime minister, whose political colors are more liberal than socialist. But the German-Polish relationship looks to be relatively harmonious regardless of the ruling party in Berlin.

It has been that way for some time. Before the current Merkel-Tusk alignment of conservative leaders, German-Polish ties were positive under former German chancellor Gerhard Schröder, a Social Democrat, and his foreign minister, Joschka Fischer of the Greens. Schröder and Fischer were instrumental in the success of the EU’s 2004 enlargement, which brought in Poland. Relations were also close when Germany’s two largest parties, the Social Democrats and Merkel’s Christian Democratic Union, formed a governing coalition in 2005–2009. Then the Social Democratic foreign minister, Frank-Walter Steinmeier, enjoyed a good understanding with Poland’s Foreign Minister Radosław Sikorski.

These partnerships suggest that relations between Berlin and Warsaw are unlikely to change significantly even if Merkel is not reelected, although the mutual trust built up in the last few years certainly has a value of its own.

Beyond personalities and coalitions, the warmth between Poland and Germany is a product of much strategic planning in both countries over the last decade. Germany has made good use of the EU’s 2004 enlargement, and German industry has taken advantage of Central Europe’s potential for low-cost production. This is seen as a win-win arrangement under which Central European firms can export around the world via the larger and better-placed German companies, allowing them to take on fewer risks even if that means getting a lower added value.

Poland itself has navigated wisely since joining the EU, with its economy growing at 18 percent a year since the euro crisis began in 2009. Warsaw has also shared with Berlin an ability to prevent significant wage rises, which has allowed Poland to maintain a competitive labor market.

On the euro crisis, Poland has reacted nervously to attempts to institutionalize the single currency area, of which Warsaw is not yet a part. Plans for more frequent eurozone summits, meetings of labor ministers, and the creation of a eurozone secretariat are “explosive material” in the words of one senior Polish official. Poland has been anxious about Germany’s perceived lack of determination in resolving the euro crisis, but Warsaw’s own preferred solution would not have been substantially different from that of Merkel’s government.

Looking east, Germany under Merkel has provided Poland with much-needed reassurances with respect to Russia and Eastern Europe. Germany and Poland are now much closer together in their assessments of Russia’s tactics. They also coordinate closely and put out joint feelers toward Russia—as evidenced by more frequent trilateral meetings among foreign ministers and planning staffs. Poland would like that to continue after the German election.

Another top foreign policy priority for both Warsaw and Berlin has to do with Ukraine’s “European vocation.” The test will come this fall when the EU will decide whether to sign an association agreement with Ukraine, which would create a framework for cooperation between Brussels and Kiev. A joint Polish-German initiative aimed at ensuring that Kiev fulfills a critical mass of the preconditions for signing the agreement could tilt the balance on the issue. For Poland, the main argument in favor of an agreement is the belief that association would help to reform Ukraine from within.

Geopolitics matters too. The more noise Russia makes about Ukraine’s EU ties, the stronger Poland’s conviction that the association agreement is a good idea, irrespective of setbacks originating in Kiev. Germany is more cautious and is unwilling to waste the EU’s political capital prematurely on a process that may not yield spectacular results in the short term. Given that the association agreement cannot sit on the table forever without being signed, this fall’s Vilnius summit of the EU’s Eastern Partnership initiative will be a litmus test of how deep the Polish-German foreign policy understanding has become.

Much remains to be done after the German elections to cement that understanding. The relative bliss that Germany and Poland currently enjoy will not be sustainable in the long term if the issue of Poland’s future eurozone membership remains unresolved. The clearer it becomes that the eurozone is emerging from the crisis, the more pressing this question will be. For the moment, Poland has mastered the art of having a foot in the door without making up its mind about when it intends to join the single currency. The domestic political reality is that the opposition Law and Justice party holds a trump card: without its support, no qualified majority in parliament can approve the constitutional amendment needed to take the country into the eurozone.

Any Polish government, however enthusiastic about the euro, can only lead the country into the single currency if public support for the euro recovers—and that support has been as low as 25 percent according to one poll last year by Poland’s Center for Public Opinion Research. Warsaw’s approach is to be heavily involved in discussions on eurozone reform and then claim ownership of whatever result emerges. In the longer term, this can only succeed with a helping hand from Germany.

The depth of Polish-German relations will ultimately depend on Germany maintaining its role as the guardian of cohesion and inclusiveness in the EU. That will be an important task for whoever wins next week’s election.

Paweł Świeboda is president of demosEUROPA—Center for European Strategy in Warsaw.