Witold Waszczykowski | Photo by EPA The big Polish-German chill Warsaw’s foreign policy faces an electoral test this fall.

WARSAW — Times may be changing Poland’s foreign policy.

If the opinion polls are correct, the right-wing Law and Justice party will take power in October 25 parliamentary elections, and the most immediate consequences may be felt in Warsaw’s relationships abroad. Nowhere more so than with Germany, Poland’s leading foreign ally since 2007. That was the year that the last government headed by Law and Justice, known by its Polish acronym PiS, was replaced by the current ruling center-right Civic Platform.

To listen to Witold Waszczykowski, a former deputy foreign minister seen as one of PiS’s foreign policy hawks, the potential disagreements between Berlin and Warsaw are unavoidable. In an interview with POLITICO, he listed them:

Climate policy: Poland is heavily dependent on coal while Germany is a leading advocate of decarbonization.

Russia: Poland sees Moscow and its destabilization of Ukraine as an imminent threat to its own independence.

Energy security, with Poland worried about being dependent on Russian gas.

NATO bases in central Europe, something Germany is unwilling to countenance and Warsaw eagerly wants.

“We have to talk seriously to the Germans about these issues,” Waszczykowski said. “On some topics our interests diverge. It’s not about starting some sort of a war with Berlin, but about starting a dialogue to iron out the differences. For example, the Germans feel that the presence of NATO troops in Poland is provoking Russia, but it’s exactly the opposite — we provoke Russia when we’re defenseless.”

We provoke Russia when we’re defenseless — Witold Waszczykowski

PiS ruled from 2005-2007 in an unstable coalition with populist and nationalist parties. Under the leadership of Jarosław Kaczyński, then prime minister and now party leader, Poland had tense relations with Germany, with Warsaw trying to use Germany’s historical guilt over World War II to improve Poland’s bargaining position in the EU.

The PiS government also had fraught ties with Russia and with Brussels, but tried to build closer ties with the U.S. and the U.K. Much of that policy was overturned when Donald Tusk led his Civic Platform party to power and made the relationship with Germany, and his personal ties with Chancellor Angela Merkel, the keystone of Poland’s foreign policy.

But Tusk is now in Brussels as the president of the European Council, and his successor Ewa Kopacz is deeply wounded after the party failed to hang on to the presidency earlier this year. Andrzej Duda, the president-elect, and Beata Szydło, the PiS candidate for prime minister, are presenting a friendlier and more moderate face than Kaczyński. The party is soaring in opinion polls. The latest shows PiS with 37 percent support and Civic Platform at only 23 percent.

If that trend holds and PiS takes power, “there isn’t going to be a revolution,” said Ryszard Czarnecki, the deputy head of the European Parliament and a senior member of PiS. “Instead there’s going to be a policy of continuation,” he said, adding that, “We can expect a greater focus on Polish-American relations, but not at the cost of Poland’s EU ties.”

A PiS government would strengthen relations with the Baltic states, Scandinavia and Romania, all countries that have growing suspicions of Russia. Czarnecki also said that a new government would work harder to revive the Visegrád Group of Poland, Hungary, the Czech Republic and Slovakia. The Civic Platform has focused more on the Weimar triangle of France, Germany and Poland.

“We won’t turn our backs on Germany, because we don’t want to confirm the stereotype of PiS as an anti-German party,” Czarnecki said. “That’s nonsense. We can have differences of opinion, but we do have a lot of areas in common, for example the eastern policy” towards ex-Soviet republics like Ukraine.

But a PiS-ruled Poland promises to be a pricklier partner than one ruled by Tusk or Kopacz. Warsaw will insist on being more closely consulted on Ukraine. It is currently not part of the so-called Normandy format comprising France, Germany, Ukraine and Russia which negotiated the shaky Minsk ceasefire accords.

“Decisions affecting our region should not be taken without a voice from the countries of our region, including Poland,” said Krzysztof Szczerski, who Duda has said he will appoint as his chief foreign policy adviser.

But there is a recognition that Poland doesn’t have the heft to conduct its own foreign policy towards Moscow, and needs to be part of the EU. “We have to sing in the EU orchestra,” said Czarnecki.

Neither Duda nor Szydło have expressed much enthusiasm over Poland joining the euro anytime soon, but there is concern that Poland is being sidelined in talks aimed at more closely integrating the common currency area.

A Brexit would be a misfortune for Europe that would be a gift to Russia — Ryszard Czarnecki

“We are not part of the discussions on the financial future of the Union, not just about the Eurozone,” said Waszczykowski. “Until now the Civic Platform government has submitted to all of demands from Brussels because it has wanted to join the euro as quickly as possible. That was a mistake.”

Warsaw also wants to strengthen national sovereignty over EU institutions. The plan is to pass legislation that “would define the control of Polish institutions over European policies,” said Szczerski.

Poland would also seek a position in the December Paris global climate summit where “climate protection does not take away Poland’s development possibilities,” Szczerski said. Poland generates almost 90 percent of its electricity from coal, and has fought fierce rear-guard actions against more ambitious EU policies aimed at curbing greenhouse gases.

A new PiS government would also try to rebuild ties with London. When it last ruled, PiS saw Poland’s future as an Atlantacist free-trading country closely allied with the U.S. — sort of an eastern version of the U.K.

“We want to broaden relations with Berlin and Paris to include London,” said Czarnecki. PiS sits with the U.K.’s ruling Conservatives in the European Parliament’s European Conservatives and Reformists grouping.

He said that PiS “doesn’t say no” to U.K. Prime Minister David Cameron’s demands to renegotiate EU treaties ahead of a referendum on whether the U.K. should stay in the EU scheduled to take place by 2017. A Brexit “would be a misfortune for Europe” that would be a “gift to Russia,” he said.

Poland will be a critical player in the coming talks with Britain, whose government is looking to carve out exemptions on access by non-British citizens to welfare services. Over 600,000 Poles live in the U.K., many of them coming after Poland joined the EU in 2004.