ISTANBUL (Reuters) - Kurdish militants on Wednesday claimed responsibility for a bomb attack on a police compound in southeast Turkey that killed three people, saying more than 2 tonnes of explosives were planted in a tunnel under the complex.

FILE PHOTO : A damaged building is seen after an explosion at a police compound in the southeastern city of Diyarbakir, Turkey, April 11, 2017. REUTERS/Sertac Kayar/File Photo

The blast on Tuesday tore through the compound in Diyarbakir, the largest city in the mainly Kurdish southeast.

Authorities initially said the explosion, days before a referendum on expanding President Tayyip Erdogan’s powers, appeared to have occurred during repairs to an armored vehicle but later said it was a terrorist attack.

The Kurdistan Workers Party (PKK) said in a statement its militants had planted more than 2.5 tonnes of explosives under the complex. The PKK, which has waged an armed struggle against the state for more than three decades, is considered a terrorist group by Turkey, the United States and Europe.

“It turned out that the explosion was the result of a terrorist attack,” Interior Minister Suleyman Soylu told broadcaster Haberturk on Wednesday. “They dug a tunnel and placed the explosives in the ground.”

The Diyarbakir governor’s office said the attackers dug a 30-metre tunnel from the basement of an adjacent building. Forensic investigations showed that about 1 tonne of explosives and diesel were detonated by timer, it said.

One officer and two civilians were killed in the blast. Four wounded people remain in hospital.

The governor’s office said five people suspected of direct links to the incident had been arrested. Another 172 people “thought to be in relation with terrorists” were also detained, it said without giving details.

The attack came ahead of Sunday’s referendum on changing the constitution and creating an executive presidency long sought by Erdogan. It also marks the first militant attack since the campaigning for the April 16 referendum officially started.

Turkey faces multiple security threats, including from Islamic State and Kurdish militants. More than 40,000 people, most of them Kurds, have died since the autonomy-seeking PKK launched its insurgency in 1984.