Top European Union officials have voiced concern over the detention of two leading political figures in the largest city in Turkey's mainly Kurdish southeast.

EU foreign policy chief Federica Mogherini and Commissioner Johannes Hahn said in a statement Wednesday that Turkey must respect rule of law as it deals with the security threat posed by Kurdish militants. "A political solution is the only viable option," the statement said.

Diyarbakir mayor Gultan Kisanak and Firat Anli, who serves as co-mayor, were detained Tuesday as part of a terrorism investigation. They are members of the pro-Kurdish Peoples' Democratic Party or HDP.

The government accuses the HDP of being the political wing of the Kurdish militant group PKK. The party denies the accusation.

The HDP has called for protests to denounce the detentions but the Diyarbakir governor's office said the demonstration will not be allowed.