ANKARA (Reuters) - Turkish authorities said on Friday they had detained eight people in connection with a bomb which rocked the capital Ankara on Thursday, injuring three people.

A ninth suspect was killed during the operation to round up the group, they said.

Soon after the blast on Thursday night, authorities had reported the explosion took place in the gas boiler room of a tax office in the Cukurambar district.

But after investigating security footage, police said a man had placed a bag they believe contained explosives at the entrance to the building, the governor’s office said in a statement on Friday.

It said eight people, including the man believed to have planted the explosives, had been detained in four separate provinces. The suspect who was killed had entered Turkey illegally and received training from a branch of the Syrian Kurdish PYD group, the governor’s office said.

Turkey considers the YPG, the armed wing of the PYD, to be an extension of the Kurdistan Workers Party (PKK) which has waged a decades-long insurgency in Turkey’s mainly Kurdish southeast.

Turkey’s military launched an incursion into northern Syria’s Afrin region against the U.S.-backed YPG militia two weeks ago.

Ankara Governor Ercan Topaca said three people had sustained light injuries from flying debris at the scene of Thursday’s explosion.

Images from the scene showed extensive damage to the building’s facade. Windows of nearby cars were blown out and debris was strewn in the street.

The building had been empty except for security personnel at the time of the blast, local media said.