Turkey declared a national day of mourning Sunday after twin blasts in Istanbul killed 38 people and wounded 155 others near a soccer stadium — the latest large-scale assault to traumatize a nation confronting an array of security threats.

The bombs Saturday night targeted police officers, killing 30 of them along with seven civilians and an unidentified person, Turkey's Interior Minister Suleyman Soylu told reporters Sunday. He said 13 people had been arrested in connection with the "terrorist attack."

AFP_IZ95V

Ambulances are seen near the Vodafone Arena stadium, site of a car bombing late Saturday. The target of the attack was a bus carrying police officers. (Yasin Akgul/AFP/Getty Images)

Soylu spoke at funerals for five of the officers and vowed "revenge."

Prime Minister Binali Yildirim ordered flags to fly at half-staff Sunday across the country and at Turkey's foreign missions.

Kurdish militant group TAK (the Kurdistan Freedom Falcons) claimed responsibility for the deadly bombings. It is an offshoot of the outlawed Kurdistan Workers' Party (PKK), which has waged a decades-long insurgency.

AFP_IZ8GG

Police work next to damaged police vehicles and cars on the site where a car bomb exploded near the stadium of football club Besiktas in central Istanbul. (Ozan Kose/AFP/Getty Images)

In a statement posted on its website, TAK said two of its members "were heroically martyred" in the attack, which the group said was reprisal for state violence in the southeast and the ongoing imprisonment of Abdullah
Ocalan, the leader of the PKK.

Deputy Prime Minister Numan Kurtulmus told the private news channel CNN Turk that "arrows point to the PKK." That preliminary assessment was echoed by the interior minister. 

"We have once again witnessed tonight in Istanbul the ugly face of terror which tramples on every value and decency," Turkish President Recep Tayyip Erdogan said.

Soylu said 136 people remained in hospital after the attack, including 14 under intensive care.

Funeral services have already begun at Istanbul's police headquarters for some of the officers slain in twin bombing attacks near the city's soccer stadium. President Erdogan, Prime Minister Binali Yildirim and other top officials were in attendance as police carried the coffins of their comrades draped in the Turkish flag.

Erdogan vowed his country would fight "the curse of terrorism till the end" after paying a visit to some of the wounded at Haseki Hospital in Istanbul.

Surrounded by a crowd chanting his name and "God is great," Erdogan vowed that the perpetrators would be found and forced to "pay an even heavier price."

Hundreds of flag-carrying demonstrators marched Sunday along Istanbul's coastline toward the stadium at the heart of the blast area.

epaselect TURKEY BOMB ATTACK

Police officers stand inside a damaged bus after the explosion. (Sedat Suna/EPA)

The first and larger explosion took place about 10:30 p.m. after the home team Besiktas beat visitor Bursaspor 2-1 in the Turkish Super League. Erdogan said the timing of the attack aimed to maximize the loss of life and vowed the nation would overcome terrorism.

CBC in Istanbul

CBC correspondent Nil Köksal was on the scene near the stadium and said six or seven ambulances had raced past her location. There were buses filled with heavily armed officers. 

The civilian death toll was lower because fans had already left the newly built Vodafone Arena Stadium after the soccer match when the blasts occurred. Witnesses also heard gunfire after the explosions.

TURKEY-BLAST/

People carry the flag-draped coffins of police officers killed in Saturday's blasts in Istanbul. (Murad Sezer/Reuters)

Soylu said the first explosion was caused by a passing vehicle that detonated in an area where police special forces were located at the stadium exit. A riot police bus appears to have been the target.

Turkish officials said a person who had been stopped in nearby Macka Park committed suicide by triggering explosives moments later.

TURKEY-BLAST/

Turkish Prime Minister Binali Yildirim, President Tayyip Erdogan and former president Abdullah Gul pray during a ceremony for the police officers. ( Murad Sezer/Reuters)

Authorities have determined that about 300-400 kilograms of explosives were used in the attack.

Forensic experts in white uniforms worked overnight, scouring the vicinity of the stadium and the vast park where the suicide bombing took place. Glass from the blown-out windows of nearby buildings littered the pavement.

This year Istanbul has witnessed a spate of attacks attributed by authorities to the Islamic State group or claimed by Kurdish militants. A state of emergency is in force following a failed July 15 coup attempt.

Turbulent year

The turbulent year also saw attacks on Istanbul's airport in Ankara and others in busy and popular tourist areas of the city.

TURKEY-EXPLOSION/

Rescue workers arrive at the site of fatal explosions in central Istanbul. (Reuters)

The latest attack happened after an important day in the Turkish parliament. Erdogan's party and the opposition party closest to his government presented a joint bill to move toward a presidential system in Turkey. It is a controversial move and one that will be decided in a spring referendum.

Soylu acknowledged the country was struggling against "many elements" trying to compromise its fight against terrorism.

Turkey is a partner in the U.S.-led coalition against the Islamic State and its armed forces are active in neighbouring Syria and Iraq. It is also facing a renewed conflict with an outlawed Kurdish movement in the southeast.

TURKEY-EXPLOSION/

Turkish policemen are seen at the site of the blasts. (Reuters)

Turkey's pro-Kurdish People Democratic Party, or HDP, issued a statement "strongly condemning" the attacks and saying it "felt great sadness and shared in the sorrow."

[Turkish authorities, particularly the president, have routinely accused the party of being linked to the PKK and backing terrorism. The party, which had both of its leaders detained in terror probes and multiple elected officials arrested or removed from public service in the southeast, denies the charge.

93768344

Forensic police attend the scene following one of the bombings near the Besiktas Vodaphone Arena. (Kurtulus Ari/Getty Images)

The chair of the main opposition Republican People's Party also issued a statement condemning the attack.

Ned Price, a spokesman for the White House National Security Council, said Washington condemned the attack in "the strongest terms."

AFP_IZ8FW

An emergency worker stands in front of a damaged bus on the site of one of the bombings. (Ozan Kose/AFP/Getty Images)

"We stand together with Turkey, our NATO Ally, against all terrorists who threaten Turkey, the United States, and global peace and stability," Price said.

The Besiktas sports club "strongly condemned" the attack and said a store employee was among the fatalities as well as a security official. Bursaspor issued a statement wishing "a speedy recovery to our wounded citizens."

Turkey Explosions

Turkish police officers cordon off the roads leading to the area of the Besiktas football club stadium in Istanbul. (Emrah Gurel/Associated Press)

Aleksander Ceferin, president of European soccer's governing body UEFA, and European Union Enlargement Commissioner Johannes Hahn also condemned the attack.

"Violence has no place in a democratic society," Hahn wrote on Twitter.

The U.S. Consulate General in Istanbul urged its citizens to avoid the area in Istanbul, which is also home to a Ritz Carlton hotel.

Turkey's radio and television board issued a temporary coverage ban citing national security concerns. It said "to avoid broadcasts that can result in public fear, panic or chaos, or that will serve the aims of terrorist organizations."

With files from CBC's Nil Köksal