The mayor of a city in Poland was in very serious condition after he was stabbed on stage Sunday during the finale of a large charity event, and Polish media reported details that gave the attack a political element.

READ MORE: Huawei employee arrested on spying allegations in Poland

Gdansk Mayor Pawel Adamowicz was attacked with a knife while he stood on stage, held his belly and collapsed during the “Lights to Heaven” fundraiser organized by the Great Orchestra of Christmas Charity, Poland’s most important charity.

Polish President Andrzej Duda said he was informed that “doctors succeeded in reanimating the heart of the seriously injured Mayor Pawel Adamowicz and there is hope, but his condition is very difficult.” He called on for people to pray for the mayor.

Polish broadcaster TVN reported that the suspected assailant shouted from the stage that he was imprisoned under a previous national government led by Civic Platform, a party to which the mayor formerly belonged, despite being innocent. He was arrested.

Story continues below advertisement

WATCH: Poland mourns as five teens die in escape room fire

1:08 Poland mourns as five teens die in escape room fire Poland mourns as five teens die in escape room fire

Several Polish media outlets, including Rzeczpospolita, reported that the man yelled after stabbing Adamowicz: “Hello! Hello! My name is Stefan, I was jailed but innocent. … Civic Platform tortured me, that’s why Adamowicz just died.”

Police said he was a 27-year-old with a criminal record and had carried out bank robberies.

Radio Gdansk reported that Adamowicz was stabbed in the area of his heart, but did not cite its source, while Rzeczpospolita described his condition as “critical,” citing unnamed sources. A spokesman for the hospital called his condition “very serious.”

Story continues below advertisement

TVN footage showed Adamowicz on stage just before the attack with a sparkler in hand telling the audience that it had been a “wonderful day” and then the attacker coming toward him.

European Council President Donald Tusk, a former Polish prime minister who co-founded Civil Platform and is from Gdansk, wrote on Twitter: “Let’s all pray for Mayor Adamowicz. Pawel, we are with you.”

The head of the charity, Jerzy Owsiak, is a liberal critic of Poland’s current right-wing government. He blamed what he described as an atmosphere of hate under the ruling Law and Justice party for the attack on the mayor.

WATCH: Video purportedly shows moment of stabbing of Poland mayor

0:39 Video purportedly shows moment of stabbing of Poland mayor Video purportedly shows moment of stabbing of Poland mayor

Owsiak referred to being personally depicted in a defamatory manner in an animation that ran on state TV last week and that also had anti-Semitic overtones.

Story continues below advertisement

The animation showed Owsiak as a clay figure being manipulated by a leading Civic Platform official who seized piles of cash that he collected, apparently suggesting the charity was a ruse to raise money for the opposition party. A Star of David was on one of the banknotes. The broadcaster apologized after the animation triggered an outcry.Adamowicz, 53, has been mayor of Gdansk, a Baltic port city, since 1998. He was part of the democratic opposition born in that city under the leadership of Lech Walesa during the 1980s. After leaving Civic Platform, he was re-elected to a sixth term as an independent candidate in the fall. READ MORE: Canada co-hosts ‘coal-free day’ at UN climate meeting in Poland As mayor, he has been a progressive voice, supporting LGBT rights and tolerance for minorities. He marched in last year’s gay pride parade, a rare action for a mayor in Poland.He also showed solidarity with the Jewish community when the city’s synagogue had its windows broken last year, strongly denouncing the vandalism.“Horrified by the brutal attack on Gdansk mayor Pawel Adamowicz,” said Frans Timmermans, a Dutch politician and leading European Union official. “Hope and pray he will recover. A great leader of his city and a true humanitarian.”The Great Orchestra of Christmas Charity raises money for state-of-the-art medical equipment Poland’s cash-strapped health care system, mostly for children but also for the elderly. As mayor, he has been a progressive voice, supporting LGBT rights and tolerance for minorities. He marched in last year’s gay pride parade, a rare action for a mayor in Poland.He also showed solidarity with the Jewish community when the city’s synagogue had its windows broken last year, strongly denouncing the vandalism.“Horrified by the brutal attack on Gdansk mayor Pawel Adamowicz,” said Frans Timmermans, a Dutch politician and leading European Union official. “Hope and pray he will recover. A great leader of his city and a true humanitarian.”The Great Orchestra of Christmas Charity raises money for state-of-the-art medical equipment Poland’s cash-strapped health care system, mostly for children but also for the elderly.