Turkey observed a day of mourning Sunday after twin bombings killed 38 people near an Istanbul football stadium in attacks authorities said were likely the work of Kurdish militants.
A car bomb detonated Saturday night outside the home stadium of football giants Besiktas after a Super Lig match against Bursaspor, and less than a minute later a suicide attacker blew himself up near a group of police at a nearby park.
President Recep Tayyip Erdogan, who postponed foreign travel, decared Turkey would "fight terrorism to the end".
He and Prime Minister Binali Yildirim attended the funeral of five of the 30 police officers killed, while flags were ordered flown at half mast.
In a solemn ceremony at Istanbul's police headquarters the leaders spoke with the victims' families and watched as officers carried their coffins draped with the Turkish flag.
"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 Besiktas stadium to lay flowers, many holding Turkish flags and shouting "Down with the PKK!" and "Our homeland is indivisible!"
Who is responsible?
Sources told WION the "PKK has no relation with such attacks. It has criticised and condemned them many times. TAK [Freedom Falcons of Kurdistan] has assumed responsibility for it."
The BBC website reports that the TAK claimed responsibility, which they describe as an "offshoot of the PKK". The TAK website, indeed, claimed the attack, despite describing the attack in exaggerated terms.
Soylu said 30 police, seven civilians and an unidentified person had died in the blasts and 155 were wounded. Thirteen people have been detained over the blasts.
"The findings point to the PKK as the authors" of the attacks, Soylu said, referring to the outlawed Kurdistan Workers Party (PKK).
Deputy Prime Minister Numan Kurtulmus, speaking on CNN Turk television, said the attack had targeted the police. "Experts say at least 300-400 kilogrammes of explosives had been used. There was a pit where the car detonated," he said.
A forensic team on Sunday inspected the stadium and the park to collect evidence, an AFP journalist said, while municipal workers cleaned up the area.
State broadcaster TRT late Saturday showed images of the wreckage of a car engulfed in flames with emergency services swarming around the scene outside the sports venue.
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 and famously played a big role in the 2013 protests against Erdogan, who was then prime minister.
There was no immediate claim of responsibility for Saturday's attack.
In an earlier statement, Erdogan said that "the name or the method of the terrorist organisation that perpetrated the vile 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.
Prayers with #Istanbul
Besiktas in a statement 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 Prime Minister Binali Yildirim's offices and about a kilometre (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 #Istanbul tonight."
"We don’t know who is behind the attacks but nothing can justify such acts," German Foreign Minister Frank-Walter Steinmeier said.
"They also targeted a society of sport fans which was trying to recover from the horrible attacks of recent months and find its way back to normality."