ON JULY 1ST, about 1,000 dark-suited delegates squeezed into a school sports hall in Przysucha, a small town 100km south of Warsaw, for the national congress of the governing Law and Justice (PiS) party. Since coming to power in 2015, the right-wing party and its leader, Jaroslaw Kaczynski, have packed the constitutional tribunal with their own loyalists, transformed the public broadcaster into a propaganda mouthpiece for the government and clashed with the European Commission over migration policy and the rule of law. The country’s nativist lurch has outraged liberals and divided Polish society. The party congress’s slogan, “Poland is one”, seemed like an Orwellian attempt to deny the split, or perhaps to rub it in.

Mr Kaczynski, who turned 68 last month, was in high spirits. From the podium he enumerated PiS’s successes, such as reducing child poverty and improving tax collection. He also ran through new projects for which the party has high hopes, such as further taming the media and the judiciary. When he cracked a joke about Nikita Khrushchev, his government ministers chuckled obediently. (Ironically, the joke concerned the slavishness that Communist Party members used to display towards their leaders.) Beata Szydlo, the prime minister, sat silently in the front row. There was no speech by her.

Perhaps the most buoyant words at the congress came in anticipation of Donald Trump’s visit to Warsaw on July 6th. Other countries “envy it”, said Mr Kaczynski. Some delegates described Mr Trump and Mr Kaczynski as birds of a feather: both “care for their countries’ economies and citizens”, noted Waldemar Andzel, a PiS member of parliament (the implication being that their liberal opponents do not). In contrast, the tone towards Brussels was defiant. PiS likes European Union structural funds very much, Mr Kaczynski acknowledged, but has “a full moral right to say no” when the EU wants it to take in migrants. Asked whether Poland should help other EU countries by accepting refugees, one young participant retorted that Western countries had shown no solidarity with Poland during the Polish-Soviet war of 1919-21.

On the economy, PiS was similarly upbeat. “For the first time in 28 years there are more optimists than pessimists in Poland,” proclaimed Mateusz Morawiecki, the economy and finance minister. PiS’s welfare policies, including a monthly child subsidy of 500 zlotys ($134), are extremely popular. Mr Morawiecki, who previously headed the Polish business of Santander, a Spanish bank, also praised PiS’s “sovereign” economic policy. “One might ask…why do we need Polish banks if there are foreign ones? What is the zloty for if there is the euro? What is PiS for, if there is the CDU?” he quipped, referring to the German Christian Democratic party. The crowd was delighted.

The next test for PiS will come at the country’s local elections, scheduled for November 2018. Opinion polls put it in first place, about eight percentage points ahead of the centre-right Civic Platform party. Confident of its power, the party seems to have muted some of its wilder rhetoric. There was no mention at the congress of the swirling conspiracy theories about the plane crash in Smolensk in 2010 that killed the then president, Lech Kaczynski, the current party leader’s twin brother. But while the tone may be less strident, the programme is as nationalistic and illiberal as ever.