Polish and European officials joined thousands of people for the funeral of Pawel Adamowicz, Gdansk city's mayor who was stabbed to death at a charity event this week.
European Council President Donald Tusk, a personal friend of Mr Adamowicz, joined Poland's President Andrzej Duda and Prime Minister Mateusz Morawiecki along with former leaders including Lech Walesa.
Other dignitaries included former German president Joachim Gauck and city mayors from other countries. The powerful leader of Poland's ruling conservative party, Jaroslaw Kaczynski, was not in attendance.
Crowds in the streets were able to watch the ceremony on giant screens.
The urn with the mayor's ashes will be laid to rest at one of the basilica's chapels.
Mr Adamowicz was addressing crowds on stage at the Great Orchestra of Christmas Charity when he was attacked in front of a shocked audience.
Doctors operated for five hours on Mr Adamowicz, who was stabbed by the suspect, a 27-year-old who had been recently released from prison and served a term for bank robberies, in the heart and abdomen.
The man shouted out the attack was an act of revenge against a political party Mr Adamowicz had belonged to.