A suicide bombing which killed 51 people in the Turkish city of Gaziantep was carried out by a 12 to 14-year-old, President Recep Tayyip Erdogan said.
Mr Erdogan said the so-called Islamic State (IS) was behind the attack, which targeted a Kurdish wedding party. Gaziantep, near the Syrian border, is known to have several IS cells.
The bomb wounded 69 people, Mr Erdogan added, 17 of them seriously.
The bomber targeted the wedding guests as they danced in the street.
The BBC’s Seref Isler, who is from Gaziantep, says the city of 1.5 million was already on edge because of events in Syria, where IS has been battling Syrian Kurdish forces.
A suicide bomber believed to have links to IS killed two policemen in Gaziantep in May.
Was IS behind this? Analysis by Mark Lowen, BBC News, Istanbul
The choice of target seems designed for maximum effect: those enjoying a moment of a celebration at a wedding party.
If this was an attack by so-called Islamic State, it could be a response to the jihadists’ recent loss of territory in Syria. Kurdish fighters with the US-led coalition drove them out of a stronghold, Manbij. Perhaps this attack on a Kurdish wedding in Gaziantep was an act of revenge.
It comes as Turkey’s prime minister announces that his government will play a more active part in the Syrian conflict. We understand that Turkish-backed rebels are preparing a further offensive into the IS-held province of Jarablus and will be granted safe passage across the Turkish border. This attack could have been a warning shot by IS.
In a written statement published by local media (in Turkish), Mr Erdogan argued there was “no difference” between IS, the Kurdish militants of the PKK, and followers of US-based cleric Fethullah Gulen, whom he blames for the coup attempt last month.
“Our country and our nation have again only one message to those who attack us – you will not succeed!” he said.
The bomb went off in a part of town popular with students and which has a large Kurdish community.
Local MP Mahmut Togrul told the Reuters news agency it had been a Kurdish wedding.
Mr Togrul’s party, the pro-Kurdish Peoples’ Democratic Party (HDP), said the wedding had been for one of its members.
According to a report (in Turkish) by Turkey’s Dogan news agency, the couple had moved to Gaziantep from the Kurdish town of Siirt further east to escape fighting between Kurdish rebels and security forces.
Media reports in Turkey said that the married couple survived the blast but were taken to hospital.
On Sunday morning, smashed garage doors and windows could be seen at the site of the blast, Reuters reports.
“The celebrations were coming to an end and there was a big explosion among people dancing,” said Veli Can, 25.
“There was blood and body parts everywhere.”
The United States condemned the attack, calling it a “barbaric act”.
Ned Price, a spokesman for the US National Security Council, said: “We stand with the people of Turkey as they defend their democracy in the face of all forms or terrorism.”
On Saturday, Turkey’s government said the country would take a more active role in efforts to end the war in Syria.
Deadliest recent attacks on civilians in Turkey
- 20 August: Bomb attack on wedding party in Gaziantep kills at least 51 people, IS suspected
- 29 June: A gun and bomb attack on Ataturk airport in Istanbul kills 41 people, in an attack blamed on IS militants
- 13 March: 37 people are killed by Kurdish militants in a suicide car bombing in Ankara
- 17 February: 28 people, many of them civilians, are killed in an attack on a military convoy in Ankara
- 12 January: 10 people, including at least eight German tourists, die in a suicide bombing in Istanbul, thought to have been carried out by IS
- October 2015: More than 100 people die in a double suicide bombing at a Kurdish peace rally in Ankara – the deadliest attack of its kind on Turkish soil