WARSAW, Poland — A Catholic archbishop and other speakers at the funeral Saturday of slain Gdansk Mayor Pawel Adamowicz urged an end to the political and social divisions in Poland, targeting some of their comments at the country’s ruling right-wing party.

Top Polish and European officials and thousands of citizens joined Adamowicz’s widow, two daughters and other family members at the Mass held at Gdansk’s vast Gothic St. Mary’s Basilica.

Adamowicz, 53, died Monday after being stabbed the night before at a charity event in the northern Polish city. The arrested suspect is an ex-convict who publicly voiced a grudge against an opposition party that Adamowicz once belonged to.

The slaying, which came as Poland faces a deep political divide over actions by the conservative ruling Law and Justice party, was a shock to the nation. It has drawn calls for greater national unity and condemnation of hate speech in the public sphere.

Adamowicz himself was the target of criticism in state media and hate messages by some far-right activists for his tolerance and openness to others regardless of race or religion. He had called Gdansk a city of “freedom and Solidarity.”

In his sermon at the funeral, Gdansk Archbishop Slawoj Leszek Glodz said Adamowicz’s death was a “bell calling for alarm.”

“Our homeland needs harmony” in social life and in politics, Glodz said.

Other speakers at the church drew applause, unusual for a ceremony in predominantly Catholic Poland, when they denounced hostility in public and political life.

Poland cannot 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,” said Dominican friar Ludwik Wisniewski, a friend of the slain mayor.

“A person who is filled with hatred, who builds his career on a lie, cannot hold high positions in our country and we will make sure of that,” Wisniewski said, drawing long applause for an apparent reference to Jaroslaw Kaczynski, the ruling party leader, who did not attend the funeral.

Another friend, Aleksander Hall, said Adamowicz was killed by “hatred that was instigated and fueled” in Poland’s state media.

He appealed to public officials — and especially to “those governing” — to put an end to such actions.

After the mayor’s slaying, some called this week for the head of the state TVP to be fired.

A very personal address by Adamowicz’s widow and daughter drew tears from many attending officials, former President Lech Walesa among them. They said his love was divided between the family and Gdansk.

Those at the funeral included European Council President Donald Tusk, a personal friend; Polish President Andrzej Duda; Prime Minister Mateusz Morawiecki; former German President Joachim Gauck and city mayors from The Netherlands and Germany.

Pope Francis sent rosaries to the family and assured them of his prayers. Prayers were also said by the country’s Jewish and Muslim leaders.

The black urn with the mayor’s ashes was placed before the altar, surrounded by dozens of white roses. It was later put to rest in a niche at one of the basilica’s chapels.

Crowds overflowed into the streets in Gdansk but were able to watch the funeral Mass on giant screens. Black-and-white photos of the popular mayor were also seen in many shops and apartment windows.

Residents told TVN24 that the mayor was a friendly person always ready to offer support, who greeted everyone with a smile.

Crowds also gathered around screens in Warsaw and other cities across Poland to see the funeral.