WARSAW (Reuters) - For would-be Warsaw mayor Patryk Jaki, allowing Muslims into Poland poses a threat akin to the Nazi invasion of 1939. His opponent, Rafal Trzaskowski, agrees the country faces an existential threat, but says it comes from Jaki and his allies.

The two men epitomize the divisions that have riven Poland since the ruling Law and Justice (PiS) party, in which Jaki serves as deputy justice minister, took power in 2015.

Local elections on Oct. 21 will be the first big contest between PiS and its Europhile Civic Platform opponents since then and its outcome will influence European Parliament elections in May and Poland’s next general election in 2019.

It is part of a larger struggle over Europe’s future, as Brexit and Hungary’s Viktor Orban, a PiS ally, shake up the European Union and right-wing parties make gains across the continent.

While PiS dominates national politics, Civic Platform and its allies still control 15 of Poland’s 16 regional assemblies and most of its big cities, giving them a say in issues from who runs a local school or theater to how large EU funds are spent.

Success would let PiS claim popular support for judicial reforms which the EU says undermine the rule of law. The party also opposes abortion, contraception and IVF treatment and wants culture and education to be more conservative.

Warsaw, a bastion of liberalism and scene of protests against political influence over the judiciary, would be the biggest prize.

Jaki, 33, says he sides with ordinary people against what he describes as an arrogant Civic Platform municipal elite.

“Warsaw is ruled today by people who want to say you’re inferior,” he told a cheering crowd this month in front of low-rent apartment blocks. “I am not ashamed of these blocks. We are not ashamed of this Warsaw.”

He scoffs at what he calls the European Union’s “focus on trivial matters, such as measuring a banana or instructions on how to use wellies” echoing criticisms leveled by British anti-EU campaigner Boris Johnson that EU officials term “Euromyths”.

Trzaskowski, 46, a long-time EU emissary for his party, says he wants his native Warsaw to remain “open, tolerant and European”. Jaki says Trzaskowski is out of touch and that if Catholic Poland goes along with EU plans to distribute asylum-seekers across the bloc it will become Islamised.

“Stopping Islamisation is my Westerplatte,” he said in an interview with Plus Minus weekly and on Twitter last year, referring to the peninsula where Poland tried to fend off the Nazi invasion that triggered World War Two.

Slideshow ( 29 images )

QUEUING FOR TOILET PAPER

Poland joined the European Union in 2004 after decades of Soviet domination and there is little popular appetite for leaving it.

But PiS has zeroed in on deep-rooted fears of foreign meddling and the EU’s threat of sanctions over its judicial reforms could boost its support.

Trzaskowski labels PiS and its allies anti-European populists. “They want to rewrite the history books and question our place in the European Union,” he told Reuters.

“This is, in a sense, an existential fight.”

Recent polls suggest a close-run race, with around a dozen other candidates far behind Jaki and Trzaskowski.

Jaki belongs to Solidarna Polska, a party allied with PiS, but launched his campaign at the ruling party’s convention in September and faithfully echoes its nationalist message.

As a deputy justice minister, he championed a law that made it a crime to suggest Poland was complicit in the Holocaust. He has said Poles should be proud, not ashamed, of their wartime record. Following strong criticism at home and abroad, the law was later watered down by removing the threat of jail terms.

Born in Opole in southwestern Poland, Jaki grew up in a Soviet-era apartment block and presents himself as somebody with lowly origins to project a guy-next-door image.

Supporters of Trzaskowski, who is Warsaw-born, mock Jaki for not being a true Varsovian, as the city’s residents are called.

Trzaskowski speaks six languages and holds a doctorate in political science. Jaki’s supporters depict him as elitist.

Trzaskowski rejects the characterization. Growing up in Warsaw, “the only elites were the Communist apparatchiks,” he says.

“Whether you were the son of a bricklayer or the son of a jazz composer, as I was, we were all brought up in the same neighborhood. We were all standing in queues to buy toilet paper and, on occasion, ham.”

Slideshow ( 29 images )

Back at home, and at work, however, his learning is on display. His Warsaw office is lined with floor-to-ceiling shelves crammed with works of history. “All the other books are at home - the literature and so on and so forth,” he says.

He and Jaki promise Warsaw similar things. Both say they want to improve schools and public transport, fight pollution, build affordable housing and create more green spaces.

But their views on Europe diverge.

Jaki insists he is not anti-Europe. “We all want Poland to be in the European Union,” he says. But last year he said the EU was “looking for an excuse to bash Poland” because of its leaders’ open dislike for Brussels.

On Sept. 2, PiS party leader Jaroslaw Kaczynski said Poland belongs to the EU but should be careful not to catch its “social diseases.” The same month, a PiS ally, Poland’s President Andrzej Duda, called the EU “some imaginary community with little bearing on us.”

Trzaskowski, a former MEP, says playing “the anti-European card” won’t galvanize voters in Warsaw, a city that European money has helped transform. “They don’t want Poland to be on the margins of Europe,” he says.

“MAKE WARSAW HONEST”

The two men stand on opposite sides of an equally divisive issue: how land and buildings seized by the Nazis and, later, the Communist government, are returned to their pre-war owners.

Poland has never passed legislation to address the issue, triggering multiple lawsuits and allegations of corruption and abuse.

Some Varsovians have been evicted from properties they have occupied for generations. Others have watched developers profit from land their families once owned.

Jaki is chairman of a high-profile committee set up to investigate such irregularities, which he has blamed on opposition politicians and their allies.

Trzaskowski blames “all the political classes” for failing to compensate people whose property was seized, and says voters do not associate him with the issue.

But it remains a central theme in his opponent’s campaign. In mid-September, escorted by three shaven-headed bodyguards, Jaki spoke in a gritty but gentrifying area called Praga, Warsaw’s answer to Brixton or the Bronx.

There, he vowed to rid City Hall of alleged corruption and “do everything in our power to finally make Warsaw honest”.

Across town, in the upscale Mokotow district, Trzaskowski addressed a home crowd at a local cultural center.

Usually, he says, local election campaigns in Poland are short, but Trzaskowski is steeling himself for a grueling race.

“You need to be where the elections are being fought,” he says, “because that’s where the fate of Poland will be decided.”