An angry mob featuring a member of Turkey’s Islamist ruling Justice and Development Party (AKP) attempted to beat and “lynch” secular opposition party leader Kemal Kılıçdaroğlu during a soldier’s funeral Sunday.

Video of the event shows Kılıçdaroğlu receiving blows to the head while men shout “God damn you” in Turkish, injuring the Republican People’s Party (CHP) leader before security guards whisked him away.

President Recep Tayyip Erdogan of the AKP condemned the attack, and the party expelled Osman Sarıgün, an official member, for participating in the beating.

Kılıçdaroğlu was attending the funeral of 26-year-old soldier Yener Kırıkçı in Ankara. Kırıkçı died in a confrontation with members of the Marxist Kurdistan Worker’s Party (PKK), according to officials. The PKK is a U.S.-designated terrorist group the Turkish government has spent years fighting in the nation’s largely Kurdish south at great expense to the local civilian population.

The mob attacking Kılıçdaroğlu appeared to identify him as a PKK sympathizer, according to Turkey’s Hurriyet newspaper. The men chanted “PKK out” upon identifying the opposition leader at the funeral, then began shouting “God damn you” and “shame on you” while attempting to beat him. Reuters states that video shows “Kilicdaroglu was hit on the head at least twice” before security extracted him from the area.

Kılıçdaroğlu survived a PKK attack in 2016:

Genel Başkanımız Sayın Kemal Kılıçdaroğlu’na yapılan saldırı kin ve nefretinizin dışa vurumu faşizmin ta kendisidir.#KılıçdaroğluYalnızDeğildir pic.twitter.com/qeR61xZ8xk — Yusuf Özkanlı (@YusufZkanl) April 21, 2019

Hurriyet reported that authorities took Kılıçdaroğlu to a home near the funeral before extracting him safely. Erdogan’s Defense Minister Hulusi Akar met Kılıçdaroğlu and offered assurances for his safety.

Following the attack, Kılıçdaroğlu vowed to continue attending funerals for Turkish soldiers.

“What they want is that I do not attend the funerals of martyrs, but I will,” he told a crowd that had formed in front of the CHP headquarters in Ankara. “These martyrs belong to 82 million. They respect neither the funeral, nor the call to prayer. What do you want from the prayer, from the martyrs?”

“I do not feel sorry that I am attacked. What makes me feel sorry is the attack directed against the disrespect shown to the martyr,” he noted. “Even the funeral prayer could not be properly performed. The mother and father are grieved. The ones living in this village are not to blame. It is a plot staged by the ones coming from outside.”

Kılıçdaroğlu did not name a specific “they” outside of the members of the mob. His deputy, Yıldırım Kaya, however, told reporters that the police did nothing to prevent the situation from resulting in serious injury.

“None of them tried to protect us. The director general of public security was there. The provincial police chief was also there. There were many people dressed as police or gendarmerie. But none of them attempted to protect us,” Kaya told reporters, according to the secularist newspaper Cumhuriyet. “The interior minister, who previously called people not to allow CHP politicians to attend to the military funerals, must resign.”

Interior Minister Süleyman Soylu has vowed an investigation into the incident, and Ankara prosecutors stated they had launched an investigation into potential “terrorism.” Police have arrested nine individuals for participating in the attack, among them AKP member Osman Sarigun. The AKP has revoked Sarigun’s membership.

“Our Ankara Executive Board has decided to send him to the disciplinary board for his dismissal from the party. AK Party is against all forms of violence. Our principle absolutely rejects violence. There is no place for violence in democratic politics,” AKP spokesperson Ömer Çelik said.

Erdogan personally condemned the attack on Monday.

“Unfortunately, some unwelcome incidents took place yesterday during the funeral for one of our martyrs in Cubuk [district of Ankara] and protests against CHP leader Kemal Kilicdaroglu turned into an act of violence,” he said on Twitter, according to a translation by the state-run Anadolu news agency. “We never approve of violence.”

Erdogan and Kılıçdaroğlu have been bitter political enemies for years. Erdogan has sued Kılıçdaroğlu repeatedly for insulting him – a crime in Turkey. In November 2017, Erdogan sued the CHP leader for accusing him and his children of tax evasion. In March 2018, Erdogan filed a lawsuit after Kılıçdaroğlu accurately stated that Erdogan was once an ally of Islamic Fethullah Gülen, whom Erdogan now blames for the failed 2016 coup against him. Most recently, in July 2018, Turkish prosecutors opened an investigation into Kılıçdaroğlu for posting an image on Twitter showing Erdogan in various animal forms to defend the right of expression of the artist.

Kılıçdaroğlu has referred to Erdogan’s tenure as a “dictatorship” and to the president personally as a “traitor.”

This animosity has flowed into relations between the CHP and AKP. In January 2017, lawmakers from both parties engaged in a violent brawl that left several injured after some began throwing chairs and choking and biting one another.

“The footage of the attack reveals that Kılıçdaroğlu nearly escaped lynch by a nationalist group obviously in a rage,” Hurriyet columnist Serkan Demirtas wrote of the attack. “One thing is certain: This attack is a result of long-standing polarization in Turkish politics. In a climate in which elections followed elections and political and social tension were unprecedentedly escalated by a very harsh language, such attacks on politicians are inescapable.”

Follow Frances Martel on Facebook and Twitter.