(Bloomberg) -- A top European Union official slammed Poland’s president for attacking the gay community as he campaigns before a June 28 election, saying those who discriminate shouldn’t receive aid from the bloc.

President Andrzej Duda, the candidate of the nationalist ruling party, is using a tried-and-true tactic to woo voters in the staunchly Catholic nation. Over the weekend, he denounced what he calls “LGBT ideology,” vowed to keep it away from children and compared it to Soviet communist indoctrination.

Targeting minorities is against the values of the 27-nation club, Vera Jourova, the vice president of the bloc’s executive commission, told a committee of the European Parliament Monday.

“This is outrageous -- I can’t believe this is happening in the EU,” Jourova said. “We can’t fund the projects of cities that are in breach of equality, a basic value in EU law and in the Polish constitution.”

Poland’s government, led by the Law & Justice Party, has repeatedly clashed with the EU over issues ranging from its rejection of EU quotas on housing refugees to sweeping court overhaul, parts of which the bloc’s top court has demanded Warsaw suspend. The country of 38 million is also by far the biggest net recipient of EU development aid.

‘Modern Europe’

Law & Justice has ramped up anti-gay and anti-immigrant sentiment ahead of elections before. In the run-up to last year’s parliamentary ballot, party leader Jaroslaw Kaczynski warned the advancement of gay rights posed a “grave danger” for Poland and the EU.

Kaczynski’s prime minister, Mateusz Morawiecki, has repeatedly said that his goal is to “re-Christianize Europe,” while the ruling party has tried to ban abortion and criminalize teaching teenagers the benefits of condoms or letting them know it’s okay to be gay. The commission asked Poland last month for an explanation after some 80 cities and towns declared themselves “LGBT-free zones.”

“I find it really sad that in modern Europe, politicians holding high offices decide to target minorities for potential political gains,” Jourova said. “Politicians should take responsibility for their words. Words matter and can have consequences in real lives.”

Duda said he “was attacked at home and abroad” for his comments over the weekend, adding: “I truly believe in diversity and equality.” On Monday, he again returned to the topic, saying that his moral compass is based on the teachings of Polish-born Pope John Paul II, an opponent of gay marriage.

Duda verbally attacked gays after his once strong lead in opinion polls slipped following government scandals tied to the purchase of gear used to fight Poland’s coronavirus epidemic and members of Law & Justice appearing to flout their own lockdown restrictions.

While the president is expected to win the first round of voting, opinion polls show him neck-and-neck with Warsaw Mayor Rafal Trzaskowski in a runoff slated to take place two weeks later.

©2020 Bloomberg L.P.