ISTANBUL—Kurdish separatists attacked a police complex in southeastern Turkey overnight, killing at least six people and wounding dozens in the most sophisticated attack since violence flared up between insurgents and the Turkish state in July, officials said.

The Kurdistan Workers’ Party, or PKK, struck a police station and lodgings for security officials in the Cinar district of Diyarbakir at around 11:30 p.m. on Wednesday, first with a car bomb and then with long-range weapons, the provincial governor’s office said on Thursday. Five civilians and a policeman were killed and 39 people were wounded in the attack, Prime Minister Ahmet Davutoglu said. “I vehemently condemn this attack,” he said in Ankara.

Turkish television stations broadcast images from the site of the attack, showing the facades of four-floor buildings housing policemen and their families blown off by the blast, which also triggered the collapse of a nearby, two-story private home. “There is extensive damage,” the Diyarbakir governor’s office said.

The PKK, which is listed as a terrorist organization by Turkey, the U.S. and the European Union, didn’t immediately claim the overnight attack in Diyarbakir. The Kurdish-run Firat news agency reported that an action had been staged against the police complex with a car bomb and rocket-propelled grenades, using terminology the media outlet deploys for PKK strikes without naming the group. A PKK spokesman didn’t respond to a request for comment.

Back-to-back attacks by Kurdish and jihadist militants highlight the mounting security challenges for Turkey. The government is attempting to crack down on the PKK in the country’s southeast, while at the same time trying to seal its border with Syria and cut of a key Islamic State supply route.