* Attacks came two hours after end of soccer match
* Explosions less than a minute apart
* Most of those killed were police officers
* Erdogan cancels overseas trip, flags to fly half mast
By Humeyra Pamuk and Tuvan Gumrukcu
ISTANBUL, Dec 11 Turkey declared a day of national mourning on Sunday, after two bombs killed 29 people and wounded 166 others in a coordinated attack on police outside a soccer stadium in Istanbul after a match between two top teams.
The blasts on Saturday night - a car bomb outside the Vodafone Arena home to Istanbul's Besiktas soccer team followed by a suicide bomb attack in an adjacent park less than a minute later - shook a soccer-mad nation still trying to recover from a series of deadly bombing this year in cities including Istanbul and the capital Ankara.
Prime Minister Binali Yildirim ordered flags flown at half mast to commemorate the victims, state-run Anadolu Agency said.
President Tayyip Erdogan cancelled a planned trip to Kazakhstan, his office said. Erdogan described the blasts as a terrorist attack on police and civilians. He said the aim of the bombings, two hours after the end of a match attended by thousands of people, had been to cause the maximum number of casualties.
"Nobody should doubt that with God's will, we as a country and a nation will overcome terror, terrorist organisations ... and the forces behind them," he said in a statement.
There was no immediate claim of responsibility. The Islamic State jihadist group has been blamed for some bombings in Turkey this year, while others have been claimed by Kurdish militants. The blasts came less than a week after Islamic State urged its supporters to target Turkey's "security, military, economic and media establishment".
"It was like hell. The flames went all the way up to the sky. I was drinking tea at the cafe next to the mosque," said Omer Yilmaz, who works as a cleaner at the nearby Dolmabahce mosque, directly across the road from the stadium.
"People ducked under the tables, women began crying. Football fans drinking tea at the cafe sought shelter, it was horrible," he told Reuters.
Turkey is a member of the NATO military alliance and part of the U.S.-led coalition against Islamic State. It launched a military incursion into Syria in August against the ultra-hardline Islamist group. It is also fighting a Kurdish militant insurgency in its own southeast.
VICTIMS MAINLY POLICE
Interior Minister Suleyman Soylu said the first explosion, which came around two hours after the end of the match between Besiktas and Bursaspor, was at an assembly point for riot police officers. The second came as police surrounded the suicide bomber in the nearby Macka park.
Two of those killed in the blasts were civilians. The other 27 were police officers, including a police chief and another senior officer, Soylu said. He said 17 of the wounded were undergoing surgery and another six were in intensive care.
Soylu said evidence gathered from the detonated vehicle had led to 10 arrests, but gave no indication of who the authorities thought might be behind the attack.
A Reuters photographer said many riot police officers were seriously wounded. Armed police sealed off streets. A police water cannon doused the wreckage of a burned-out car and there were two separate fires on the road outside the stadium.
Bursaspor said none of its fans appeared to have been injured. Both it and Besiktas condemned the bombings.
"Those attacking our nation's unity and solidarity will never win," Sports Minister Akif Cagatay Kilic said on Twitter. Transport Minister Ahmet Arslan, also writing on Twitter, described it as a terrorist attack.
NATO Secretary General Jens Stoltenberg condemned what he described as "horrific acts of terror", while European leaders also sent messages of solidarity. The United States condemned the attack and said it stood with its NATO ally.
The bombings come five months after Turkey was shaken by a failed military coup, in which more than 240 people were killed, many of them in Istanbul, as rogue soldiers commandeered tanks and fighter jets in a bid to seize power.
Istanbul has seen several other attacks this year, including in June, when around 45 people were killed and hundreds wounded as three suspected Islamic State militants carried out a gun and bomb attack on its main Ataturk airport. (Additional reporting by Orhan Coskun, Ece Toksabay, Umit Bektas in Ankara, Osman Orsal and Murad Sezer in Istanbul; Writing by Nick Tattersall and David Dolan; Editing by Andrew Heavens)