KRAKOW, Poland — Emmanuel Macron wants to make a new friend in Poland but he has no intention of backing away from his outreach to Russia.

The French president tried to thread that needle during a two-day visit to Warsaw, where he was cautious about criticizing the government on backsliding on democracy, was keen to enlist Poland as a military ally, but also stressed the need keep Russian President Vladimir Putin onside.

In his first visit to Poland since his election in 2017, Macron repeatedly recognized the "abandonment" and "humiliation" that the Polish people may have felt at the hands of Western Europe at different times in their recent history, adopting a markedly more conciliatory and understanding tone than at the beginning of his mandate.

He also fully backed Warsaw in the bizarre fight begun by the Kremlin, which has tried to blame Poland for starting World War II and deflect guilt for the Soviet Union's 1939 alliance with Nazi Germany and their coordinated invasion of Poland.

Macron denounced "all efforts to falsify" history and called the Russian effort to blame the Polish people for the war "a completely political project."

In a more turbulent world with an unpredictable United States and a rising China, Macron has called for a "new architecture of confidence and security" in Europe that includes Russia.

That was music to the ears of his hosts, who have been trying to rebuff Russia's propaganda efforts.

But Macron also highlighted Russia's importance to the Continent and stressed that his outreach to Moscow has made concrete gains in calming the crisis in Ukraine through the Minsk and Normandy processes. Russia illegally annexed Crimea in 2014 and militarily supports breakaway regions in the east of the country.

In a more turbulent world with an unpredictable United States and a rising China, Macron has called for a "new architecture of confidence and security" in Europe that includes Russia. "We need to reopen a strategic dialogue, without being naive and which will take time, with Russia," he told the Economist last year.

That's a position met with incomprehension in Central European countries that used to be part of Moscow's orbit until 1989.

Macron did his best to justify his position.

“I wanted to make sure that this trip is the opportunity to clarify misunderstandings that may have occurred, regarding the French position on defense and security on the one hand and toward Russia on the other hand,” Macron told reporters alongside Polish President Andrzej Duda in Warsaw on Monday. “France is neither pro-Russian nor anti-Russian. It is pro-European, and when I look at a map … we see that Russia is in Europe.”

Macron insisted that his outreach to Moscow makes sense.

"Look at the results, we re-engaged in a demanding dialogue and opened this path again," Macron said in a speech to the French community in Warsaw on Monday night. "We were able to make progress in the Minsk process, and hold a Normandy format summit in Paris and make progress on the Ukrainian crisis like we haven't been able to do in many years."

At a dinner later that evening, which POLITICO attended on the condition of not publishing direct quotes, Macron listened intently, jotting down notes on a pad, as some of Poland’s most famous Soviet-era democracy activists voiced their disagreement with his Russia policy, denounced Poland's ruling Law and Justice (PiS) party’s actions as assaults on rule of law, civil and minority rights, and pleaded for more support from the EU.

But even in that intimate setting, hearing his Polish interlocutors repeatedly bring up the trauma of the Soviet years, and the continued threat they feel from Russia, Macron didn't back down. He reiterated much of the reasoning he has offered in public speeches and interviews for his Russia policy.

Warsaw vs. Moscow

Macron, who declared last year: "What we are currently experiencing is the brain death of NATO" in the era of Donald Trump, is trying to find a new geopolitical balance for the EU that relies less on American power. That means ensuring cordial ties with Russia, but also beefing up European defense capabilities. The effort has gained new urgency in the wake of Brexit, where the U.K. remains a NATO ally but is no longer part of any EU defense initiatives.

In a sign of a new warmth between Warsaw and Paris, Macron appeared open to the idea of Polish participation in the Franco-German MGCS project to build a new European battle tank.

Warsaw tends to be suspicious of such ideas about outreach to Moscow, seeing the U.S. as its most reliable security guarantor against possible Russian aggression. Polish Prime Minister Mateusz Morawiecki called Macron's comments on NATO "dangerous" last year. Last week, the Polish government signed a $4.6 billion deal to buy 32 F-35 fighters from the U.S., and in 2018 spent $4.75 billion on U.S.-made Patriot anti-missile batteries. Warsaw has also pushed hard to have U.S. troops permanently stationed on Polish soil.

"France is completely engaged with the Atlantic alliance and for the security of its eastern flank," Macron said, adding that "European defense is not an alternative to NATO, it’s an indispensable complement.”

In a sign of a new warmth between Warsaw and Paris, Macron appeared open to the idea of Polish participation in the Franco-German MGCS project to build a new European battle tank — an effort that Poland had tried to join in the past only to be met with French hostility.

Poland, currently equipped with outdated armor, some of which dates back to Soviet times, would be a big potential buyer of the new tank.