A Kurdish militant group on Sunday claimed responsibility for twin attacks that ripped through the heart of Istanbul, killing 38 people, mostly police.
The claim was made in a statement issued by the Kurdistan Freedom Falcons (TAK), seen as an splinter group of the better-known Kurdistan Workers Party (PKK).
"A revenge squad from TAK carried out simultaneous attacks outside Istanbul Vodafone Arena stadium and Macka park at around 2230 local time (1930 GMT)," according to a TAK statement published on its website.
The militant group said the twin attacks were carried out by two TAK militants, without providing any details about the perpetrators.
Turkish government officials had earlier pointed the finger of blame at the PKK, which has waged a bloody campaign against the Turkish state since 1984.
The bloodshed, which took place in Istanbul 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 overall toll.
The carnage prompted a sharp response from President Recep Tayyip 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 president said.
In a ceremony for five of the victims at the city's police headquarters, officers carried in the coffins draped with flags as Erdogan and Prime Minister Binali Yildirim looked on before speaking with the bereaved families.
"Sooner or later we will have our revenge," Interior Minister Suleman Soylu told the mourners.
"The arm of the law is long."
People also gathered outside the stadium to lay flowers, many holding Turkish flags and shouting "Down with the PKK!" and "Our homeland is indivisible!"
Thousands later joined a protest march around the stadium, with some ruling party fans kicking the buses of opposition CHP supporters, prompting police to disperse the crowds.
Soylu said 30 police, seven civilians and one person yet to be identified had died in the blasts which had also wounded another 155 people.
"The findings point to the PKK," he said, before the TAK issued their statement.
Thirteen people have been detained over the blasts.
Deputy Prime Minister Numan Kurtulmus said the attack had targeted police.
"Experts say at least 300-400 kilograms 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.
Footage broadcast shortly after the attack showed the wrecked car outside the stadium engulfed in flames with emergency services swarming around the scene.
Other footage showed wrecked police vehicles, while witnesses said the force of the blast shattered the windows of 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.
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 an earlier statement, Erdogan said that the name of the group behind the attack did not matter.
"Nobody should doubt that we will defeat terror, terror groups, terrorists and of course the forces behind them, with God's help," he said.
In a statement, Besiktas vowed to "stand firm against the vile attackers who will never achieve their goal."
The stadium is near the Ottoman-era Dolmabahce palace that houses the premier's office and about half a mile from the busy Taksim Square, a magnet for tourists.
In June, 47 people were killed in a triple suicide bombing and gun attack at Istanbul's Ataturk airport, with authorities blaming the Islamic State group.
Another 57 people including 34 children were killed in August in a suicide attack by an IS-linked bomber at a Kurdish wedding in the southeastern city of Gaziantep.
Other deadly bombings have been claimed by the Kurdistan Freedom Falcons (TAK), seen as a splinter group of the PKK.
NATO chief Jens Stoltenberg condemned the "horrific acts of terror" in Istanbul, adding: "We stand united in solidarity with our ally Turkey. We remain determined to fight terrorism in all its forms."
The US embassy in Turkey wrote on Twitter: "Our hearts and prayers are with the people of #Istanbultonight."
German Chancellor Angela Merkel "expresses her sympathies to President Erdogan and the Turkish people following this despicable terrorist attack," her spokesman Steffen Seibert wrote on Twitter.
Foreign Minister Jean-Marc Ayrault offered his condolences to the families of the victims following "this odious act", adding: "In the face of the scourge of terrorism, France remains on Turkey's side."
Every week, more than 2 million listeners tune into our broadcast and follow our digital coverage like this story, which is available to read for free thanks to charitable contributions from listeners like you. But less than 1% of our audience supports our program directly. From now through the end of the year, every gift will be matched dollar for dollar by a generous donor, which means your gift will help us unlock a $67,000 challenge match.
Will you join our growing list of loyal supporters and double your impact today?