A man with a knife rushed on to the stage during the finale of a charity event and stabbed a Polish mayor in the abdomen Sunday, leaving the politician in very serious condition in an attack that Polish media said had a political element.

Gdansk Mayor Pawel Adamowicz grabbed his belly and collapsed on stage 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 for people to pray for the mayor.

Polish broadcaster TVN said the assailant shouted from the stage that he had been wrongly imprisoned under a previous national government led by Civic Platform, a party to which the mayor formerly belonged. The suspected attacker was arrested.

TVN broadcast footage of the perpetrator, just after the attack yelling that his name was Stefan and that “I was jailed but innocent. … Civic Platform tortured me.”

Police said the suspect was a 27-year-old with a criminal record and had carried out bank robberies. A police spokesman, Mariusz Ciarka, said the attacker gained access to the area with a media badge.

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

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. Adamowicz had been on the streets of his city Sunday collecting money for the charity, along with volunteers around the country.

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.

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.

The animation showed Owsiak as a clay figure being manipulated by a leading Civic Platform official who seized piles of cash that he collected. 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.

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 to buy state-of-the-art medical equipment for Poland’s cash-strapped hospitals, mostly for children.

The last attack on a politician in Poland was in 2010 in Lodz. A man shouting that he wanted to kill Law and Justice party leader Jaroslaw Kaczynski fatally shot an aide to one of the party’s lawmakers to the European Parliament. A second man was stabbed and injured.

At the time Law and Justice was in the opposition and Kaczynski blamed the attack at an “atmosphere of hate” under the rival party, Civic Platform.