DIYARBAKIR, Turkey—Inside the fortress walls of this city on the Tigris River, bomb-making Kurdish militants are facing down Turkish tanks, the bodies of Kurdish fighters lie in snow-covered streets, and thousands of civilians are trapped in their homes by fighting that shows no signs of easing up.

Turkey’s military operation in this Kurdish stronghold is meant to deal a crushing blow to the aspirations of an emboldened new generation of Kurdish militants fighting for self rule in a country that suppressed their rights for decades.

But few people expect the showdown in the heart of Diyarbakir—the de facto Kurdish capital and site of one of three major military operations across southeastern Turkey against Kurdish militants—to bring an end to the monthslong insurgency that has claimed hundreds of lives.

“Welcome to hell,” said one member of Turkey’s elite police force keeping watch at a sandbagged checkpoint after Kurdish militants opened fire from a nearby street.

Turkish police have detained scores of Kurdish leaders across the country. President Recep Tayyip Erdogan is backing efforts to strip the country’s most prominent Kurdish politician of immunity so he can be charged for betraying his country. And the growing power of American-backed Kurdish fighters in neighboring Syria—who are spearheading the fight against Islamic State—is propelling Kurdish activists in Turkey to push for their own self rule.