Istanbul (AFP) - A defiant President Recep Tayyip Erdogan on Sunday vowed to fight terror "to the end" as a Kurdish militant group claimed twin attacks that ripped through Istanbul, killing 38 people, mostly police.
The bloodshed, which took place late on Saturday, saw a car bomb exploding outside the home stadium of football giants Besiktas and less than a minute later, a suicide attacker blew himself up by a group of police at a nearby park.
Most of the dead were police officers, who accounted for 30 of the victims. Seven civilians also died, along with one person whose identity was unclear, officials said. Around 150 people were wounded in the blasts.
The carnage prompted a sharp response from Erdogan, who vowed Ankara would "fight the scourge of terrorism right to the end".
"They should know that they will not get away with it ... They will pay a heavier price."
The attacks were claimed by the Kurdistan Freedom Falcons (TAK), which is seen as a radical offshoot of the outlawed Kurdistan Workers Party (PKK).
"A revenge squad from TAK carried out simultaneous attacks outside Istanbul Vodafone Arena stadium and Macka park at around 10:30 pm local time (1930 GMT)," said a statement posted on TAK's website.
"Turkish people are not the direct target of TAK," it said, accusing the government of "fascism" against the Kurdish people.
The group has claimed three major attacks in Turkey this year: two in Ankara -- one on February 17 that left 28 dead, and another on March 13 that killed 34 -- as well as a car bombing in Istanbul on June 7 which claimed 11 lives.
Turkish officials had earlier said initial findings pointed to the PKK which that has waged a bloody campaign against the Turkish state since 1984.
- Pain, anger -
In a ceremony for five of the victims at the city's police headquarters, Erdogan and Prime Minister Binali Yildirim met with the families, looking on silently as the flag-draped coffins were brought in.
"Sooner or later we will have our revenge," Interior Minister Suleyman Soylu told the mourners. "The arm of the law is long".
Erdogan later chaired an emergency meeting of cabinet ministers in Istanbul to discuss the situation.
On the streets, people gathered outside the stadium to lay flowers, many holding Turkish flags and shouting "Down with the PKK!" and "Our homeland is indivisible!"
"They won't be able to divide Turkey, they won't be able to break it into pieces," one man told AFP, who gave his name only as Muammed.
But there was also anger.
"God curse the PKK!" said one woman mourner in her 50s.
- Windows blown out -
Deputy Prime Minister Numan Kurtulmus said the attack had targeted police.
"Experts say at least 300-400 kilogrammes of explosives had been used. There was a pit where the car detonated," he said on CNN Turk television.
Forensic experts were on Sunday collecting evidence at both the stadium and the park, an AFP correspondent said, while municipal workers could be seen clearing up the area and replacing road signs damaged in the stadium blast.
Thirteen people have been detained over the blasts.
Footage broadcast shortly after the attack showed a car outside the stadium engulfed in flames, as well as wrecked police vehicles, with witnesses saying the force of the blasts shattered windows in nearby homes.
"I heard two explosions in less than one minute, followed by the sound of gunshots," one witness told AFP on condition of anonymity.
The stadium is located on the shores of the Bosphorus, close to the Ottoman-era Dolmabahce palace that houses the premier's office. It is also about a kilometre (half a mile) from the busy Taksim Square, a magnet for tourists.
Besiktas is one of Istanbul's most popular football clubs, and its fans are known for their anti-establishment views. They famously played a big role in the 2013 protests against Erdogan, who was prime minister at the time.
In a statement, Besiktas vowed to "stand firm against the vile attackers who will never achieve their goal."
- Merkel offers help -
The twin attacks drew international condolences and condemnation, with NATO chief Jens Stoltenberg denouncing the bloodshed as "horrific" and the US embassy in Turkey tweeting: "Our hearts and prayers are with the people of #Istanbul tonight."
German Chancellor Angela Merkel spoke with Erdogan by phone, with the two agreeing to step up anti-terror cooperation.
"The chancellor asked the president to convey her sympathies to the victims' loved ones and offered help, if needed, to care for those who were injured," spokeswoman Ulrike Demmer said in a statement.
"The chancellor and the president agreed to intensify their cooperation in fighting terrorism," she added, without providing details.
Israel's Prime Minister Benjamin Netanyahu also condemned the bombings but said he expected Turkey to reciprocate when the Jewish state also came under attack.
"Israel condemns all terrorism in Turkey and expects that Turkey will condemn all terrorist attacks in Israel," he said. The two countries recently normalised ties after a bitter six-year diplomatic row over a Gaza-bound flotilla.