ISTANBUL (Reuters) - An offshoot of the militant Kurdistan Workers Party (PKK) claimed responsibility on Sunday for twin bombings that killed 38 people and wounded 155 outside an Istanbul soccer stadium, an attack for which the Turkish government vowed vengeance.

The Kurdistan Freedom Hawks (TAK), which has claimed several other deadly attacks in Turkey this year, said in a statement on its website that it was behind Saturday night’s blasts, which shook a nation still trying to recover from a failed military coup and a number of bombings this year..

Saturday’s attacks took place near the Vodafone Arena, home to Istanbul’s Besiktas soccer team, about two hours after a match at the stadium and appeared to target police officers. The first was a car bomb outside the stadium, followed within a minute by a suicide bomb attack in an adjacent park.

TAK, which has claimed responsibility for an Ankara bombing that killed 37, is an offshoot of the PKK, which has carried out a violent, three-decade insurgency, mainly in Turkey’s largely Kurdish southeast.

“What we must focus on is this terror burden. Our people should have no doubt we will continue our battle against terror until the end,” Turkey President Tayyip Erdogan told reporters after meeting injured victims in an Istanbul hospital.

‘WE WILL HAVE VENGEANCE’

Speaking at a funeral for five of the police officers at the Istanbul police headquarters, Interior Minister Suleyman Soylu said: “Sooner or later we will have our vengeance. This blood will not be left on the ground, no matter what the price, what the cost.”

Soylu also warned those who would offer support to the attackers on social media or elsewhere; comments aimed at pro-Kurdish politicians the government accuses of having links to the PKK, which is designated as a terrorist organization by the United States, Europe and Turkey.

In recent months thousands of Kurdish politicians have been detained, including dozens of mayors and the leaders of the Peoples’ Democratic Party (HDP), parliament’s second-biggest opposition party, accused of having links to the PKK.

The crackdown against Kurdish politicians has coincided with widespread purges of state institutions after July’s failed coup, which the government blames on followers of a U.S.-based Muslim cleric.

Turkey says the measures are necessary to defend its security, while rights groups and some Western allies accuse it of skirting the rule of law and trampling on freedoms.

In a statement, the pro-Kurdish HDP condemned the attack and urged the government to end what it called the language and politics of “polarization, hostility and conflict”.

Soylu said that the first explosion was at an assembly point for riot police. The second came as police surrounded the suicide bomber in the nearby Macka park.

Slideshow ( 16 images )

Thirty-eight people died, including 30 police and seven civilians, he said. One person remained unidentified.

Thirteen people have been detained in connection with the attacks, Soylu said.

A total of 155 people were being treated in hospital, with 14 of them in intensive care and five in surgery, Health Minister Recep Akdag told a news conference.

Slideshow ( 16 images )

Flags flew at half-mast and Sunday was declared a day of national mourning.

Deputy Prime Minister Numan Kurtulmus said that Turkey’s allies should show solidarity with it in the fight against terrorism, a reference to disagreements with the United States over the fellow NATO member’s policy on Syria. Washington backs the Syrian Kurdish YPG in the fight against Islamic State. Turkey, meanwhile, says the militia is an extension of the PKK and a terrorist group.

In addition to the Kurdish insurgency, Turkey is battling Islamic State as a member of the United States-led coalition against the jihadist group. Less than a week ago Islamic State urged its supporters to target Turkey’s “security, military, economic and media establishment”.

‘MY SON WAS MASSACRED’

Video purporting to show the father of one of the victims, a 19-year-old medical student in Istanbul for a weekend visit, went viral on social media in Turkey.

“I don’t want my son to be a martyr, my son was massacred,” the footage showed the father saying. “His goal was to be a doctor and help people like this, but now I am carrying him back in a funeral car.”

Security remained tight in Istanbul, with police helicopters buzzing overhead in the Besiktas district near the stadium.

NATO Secretary-General Jens Stoltenberg condemned what he described as “horrific acts of terror”, while European leaders also sent messages of solidarity. German Chancellor Angela Merkel called Erdogan to convey her condolences, sources in his office said.

The United States condemned the attack and said it stood with its NATO ally.