Poland held a day of mourning on Saturday as it held the funeral service for Pawel Adamowicz, the mayor of Gdansk who was stabbed to death last weekend at a charity concert.
The assassination has shocked Poles and thousands of mourners gathed outside St Mary's Basilica in the city.
Amongst the congregation was Donald Tusk, the European Council president, who is himself Polish.
Gdansk was the birthplace of Solidarity, the movement which brought an end to communism in Poland, and its mayor was a beacon of tolerance for many Poles.
As a liberal critic of the ruling party's anti-immigrant policies Adamowicz's killing has highlighted the charged atmosphere in parts of eastern Europe where populist leaders have fanned nationalist sentiment.
Adamowicz's killer was a 27-year-old former convict, named only as Stefan W.
Speaking on stage, he accused the mayor's former party of putting him in prison, where he said he was tortured.
He was freed last month after serving 5-1/2 years for attempted bank robbery.
Authorities have also detained at least 10 people in recent days over calls on social media to murder and other acts of aggression in the wake of Adamowicz's death.
Critics blame Poland's politicians for cranking up hate speech in public life.
Adamowicz was one of 11 Polish mayors targeted with fake death certificates by a far-right group called All-Polish Youth in 2017, after signing a declaration to welcome refugees in opposition to government policy.
Support for the conservative PiS fell to 30 percent in the wake of Adamowicz's death, according to a poll conducted by Kantar Millward Brown for Gazeta Wyborcza daily, from 33 percent in November.
The biggest opposition grouping Koalicja Obywatelska has 25 percent.
As well as encouraging migrants to seek refuge in Gdansk, Adamowicz was known for backing a campaign to defend rule of law against what activists consider efforts by the PiS to increase political control over the judiciary and other bodies.