Tens of thousands of people paid tribute to murdered Polish mayor Pawel Adamowicz at his funeral in the city of Gdansk as church leaders and politicians called for an end to the country's bitter political divide.

The assassination of Mr Adamowicz, who was stabbed on stage at a major charity event last Sunday and died the following day, was met with outrage across Europe.

Police said around 45,000 people attended the funeral, where Poland’s president Andrzej Duda and prime minister Mateusz Morawiecki joined members of the public.

EU president Donald Tusk also attended the service, which saw 3,500 mourners gathered inside St Mary's Basilica in Krakow, according to broadcaster TVN24.

Gdansk Archbishop Slawoj Leszek Glodz called for an end to Poland’s political divisions at the funeral, referring to the mayor’s murder as a “bell calling for alarm”.

"Our homeland needs harmony in politics," Mr Glodz said.

Dominican friar Ludwik Wisniewski, a friend of Mr Adamowicz's, said Poland could not remain indifferent to the "spreading poison of hatred in the streets, in the media, in the internet, in schools, in parliament and also in the church".

Banners with black and white pictures of Mr Adamowicz were draped over buildings and thousands watched the service on outside TV screens.

Mr Adamowicz was a liberal critic of anti-immigration policies by Poland’s ruling party and encouraged migrants to seek refuge in Gdansk.

He was also known for backing a campaign to defend the rule of law.

Activists claim the ruling conservative Law and Justice Party (PiS) is trying to increase its political control over Poland’s judiciary.

Mourners carry a giant Polish National flag as they gather to watch the funeral service (EPA)

Labour leader Jeremy Corbyn described Mr Adamowicz’s death as “a tragic loss for Poles and all those who want to build inclusive societies”.

“Paweł Adamowicz was a true defender of liberty and equality. Today, we honour his memory and his fight for an open and tolerant society,” Guy Verhofstadt, Brexit coordinator for the European Parliament, said.

Polish authorities have arrested a 27-year-old former convict, identified only as Stefan W, over the killing.

The attacker, who had recently been released from prison, claimed he had been wrongfully imprisoned for attempted bank robbery and tortured by the mayor’s former party Civic Platform.

At least 10 other people have been detained by authorities in recent days after calls for more murders and acts of aggression on social media following Mr Adamowicz’s death.

In 2017, Mr Adamowicz was one of 11 Polish mayors who were targeted with fake death certificates by a far-right group called All-Polish Youth, after signing a declaration to welcome refugees in opposition to government policy.

The assassination has been politically divisive in Poland with some critics blaming politicians for spreading polarising rhetoric.

In the wake of Mr Adamowicz’s death, support for the PiS party has fallen to 30 per cent from 33 per cent in November, according to a poll conducted by Kantar Millward Brown.