ISTANBUL - A Turkish court on Monday sentenced the ex-mayor of a major Kurdish city to more than nine years in prison after convicting him of "membership in an armed terror group."

The Turkish authorities removed from their positions more than 20 mayors from the pro-Kurdish Peoples' Democratic Party (HDP) last year over their alleged ties to the outlawed Kurdistan Workers' Party (PKK), just months after they won local elections in March.

Critics say the suspensions were aimed at removing political opposition to Turkey's ruling Justice and Development Party in the country's southeast after poor election results.

Adnan Selcuk Mizrakli was mayor of Diyarbakir until he was suspended in August along with the mayors of Mardin and Van -- all of them replaced by government-appointed trustees.

The court in Diyarbakir on Monday convicted Mizrakli, who refused to attend the final hearing, "of membership in an armed terror group," the Anadolu state news agency reported.

Prosecutors said he attended the funerals of PKK militants and meetings that were used for the group's propaganda.

He was sentenced to nine years, four months and 15 days in prison, Anadolu said.

The government has repeatedly claimed the HDP has links to the PKK, which has fought a bloody insurgency against the Turkish state since 1984 and is listed as a terror group by Ankara and its Western allies.

The HDP says it has no official connection to the PKK but has tried to broker peace talks between the insurgents and government.