The funeral of Pawel Adamowicz, the murdered Gdansk mayor, has drawn tens of thousands of people in the Polish Baltic coast city amid outrage over his killing six days ago.

Banners with black and white pictures of Adamowicz were draped over buildings as Polish politicians including former president Lech Walesa, who helped to overturn Soviet rule in Eastern Europe, joined a mass at St Mary's Basilica on Saturday.

European Council President Donald Tusk and Polish Prime Minister Mateusz Morawiecki also joined mourners who listened to the choir as they awaited the burial of Adamowicz's ashes.

Adamowicz, one of Poland's longest-serving mayors, was attacked on stage during one of Poland's biggest annual charity events and died the following day.

Broadcaster TVN24 said 3,500 mourners gathered inside the 500-year-old Gothic cathedral on Saturday, while others watched Gdansk archbishop Leszek Slawoj Glodz give family members rosaries and gifts sent by Pope Francis on huge screens.

"What happened on Sunday evening ... was perceived as a violent constant sound of an alarming bell, call for saving the conscience and changing the way of our living, political style," Glodz told mourners during the Mass.

The murder of a liberal critic of Poland's ruling party's anti-immigrant policies highlights the charged atmosphere in parts of Eastern Europe where populist leaders have fanned nationalist sentiment.

As well as encouraging migrants to seek refuge in Gdansk, Adamowicz was known for backing a campaign to defend the rule of law against what activists consider efforts by the ruling conservative Law and Justice (PiS) party to increase political control over the judiciary and other bodies.

Solidarity

On Friday, 53,000 people paid tribute to Adamowicz, who beat the PiS in an October election, while he lay in state in the museum of the Solidarity movement that helped to usurp socialist rule in Poland.

Police said some 45,000 people had attended the funeral.

Polish authorities have arrested a 27-year-old former convict, named only as Stefan W, for the killing. He was freed last month after serving five and a half years for attempted bank robbery.

The attacker accused the mayor's former party of putting him in prison, where he said he was tortured, at the event.

Authorities have 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.

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.

Critics blame Poland's politicians for cranking up hate speech and support for the PiS party fell to 30 percent in the wake of Adamowicz's death, a poll conducted by Kantar Millward Brown showed, from 33 percent in November. The biggest opposition grouping Koalicja Obywatelska had 25 percent.