SILOPI, Turkey—War has returned to this remote southeastern city, transforming dusty streets into a battleground as surging violence between Turkish security forces and Kurdish separatists threatens to kindle a level of urban warfare not seen for two decades.

Masked militants linked to the outlawed Kurdistan Workers’ Party, or PKK, have dug explosive-laden trenches and raised barricades in Silopi, which sits on a border where Turkey, Syria and Iraq meet.

Each day, Turkish special forces play a deadly game of cat-and-mouse with armed Kurdish youths, firing tear gas and live rounds in a bid to reassert control of several neighborhoods. Before nightfall, groups of Silopi residents flee the most violent central neighborhoods, taking refuge in relatives’ homes to avoid the crossfire, according to the mayor and residents.

“When we peeked from the window, we saw police shooting randomly after the youth ran through our yard,” said Idris Yavsam, a 39-year-old employee at the local mosque in Silopi who recounted one day earlier this month. “One bullet came in and passed by the ear of my 11-year-old daughter.”

A government official said Tuesday that the scale and the nature of the clashes require more than usual anti-riot measures.Mr. Yavsam said his family of 10 hasn’t slept at home for a week, and showed eight bullet holes on the walls of his house and courtyard.

In a power play, PKK-linked militants have erected checkpoints and declared autonomous zones free from state control in cities across the southeast, where the majority of the country’s estimated 15 million Kurds live. Battles with Turkish security forces have shifted from remote military outposts to city streets as the militants attempt to show strength in urban areas.

“The PKK has deliberately moved the warfare to the cities. The level of the street fighting is unprecedented,” a Turkish government official said, accusing the militants of using civilians as human shields.

Youthful militants in Silopi deny this allegation, claiming the civilians support them.

The current flare-up in the decadeslong conflict between the PKK and the Turkish state is the culmination of several important military and political shifts recently that have had profound implications for both sides.

The PKK, which the U.S. and Turkey list as a terrorist organization, has been emboldened after affiliated Kurdish forces in Syria and Iraq scored major military victories against extremist group Islamic State. The Syrian and Iraqi Kurdish fighters have grown into important allies of the U.S.-led coalition conducting an air campaign against Islamic State, becoming the most effective ground force coordinating with the international alliance.

Kurdish separatists renewed their uprising after a June election that put a pro-Kurdish party into parliament for the first time and saw the ruling party lose its absolute majority for the first time in 13 years. After a string of militant attacks on Turkish security forces, the military launched an unexpected bombing campaign against the group and a nationwide crackdown in which more than 2,600 suspects have been detained, most of them Kurds.

A barricade erected by Kurdish militant youth in the southeastern city of Silopi in Turkey. Illustration: Ayla Albayrak/The Wall Street Journal

This shattered a two-year truce between the PKK and the government and effectively ended peace talks that had been going on for nearly three years.

Kurds have accused Turkish President Recep Tayyip Erdogan of trying to undercut their recent political gains with the newly launched military campaign against the PKK. Mr. Erdogan rejected that claim.

The government reinforced its military presence in urban areas increasingly targeted by the Kurdish militants, declaring more than three dozen areas under temporary emergency and imposing curfews—measures that were all but forgotten over the past decade.

Meanwhile, the PKK boasted that the ranks of its youthful followers had swelled.

“Now, we can talk about a mass youth uprising by the PKK,” said Cengiz Candar, author of a 2012 road map for peace talks and Kurdish disarmament. “There were uprisings in residential areas in the 1990s in Sirnak province, but they were not similar to today or at this scale.”

On the streets of Silopi, a district of long-restive Sirnak province, and in other southeastern cities such as Cizre, Sirnak, and Diyarbaki, the conflict has intensified at an alarming rate. That evoked uncomfortable memories of two decades ago, when the worst fighting left tens of thousands dead.

Members of the PKK’s youth movement said they had expanded their networks in dozens of cities while the government was holding peace talks with the insurgents’ jailed leader, Abdullah Ocalan. Now, in this city of 120,000 alone, the militants claim to have 31 units, each with 20 members.

In a two-room safe-house, some dozen Kurdish militants in their teens and early 20s are armed with Kalashnikovs, handguns, grenades and a rocket-propelled grenade launcher.

“There are many of us, and we are in every city in Turkey now,” said a 22-year-old female commander of a 10-person unit who identified herself as Berman. She left university in Istanbul last year to join a group known as the Patriotic Revolutionary Youth Movement, or YDG-H, which the Turkish government says is the PKK’s youth unit. She and her comrades say they are self-organized PKK sympathizers.

“We knew that the state would drop the peace talks, so we grew and organized ourselves meanwhile,” she said.

In the past two weeks, three civilians and five members of special security forces have been killed in Silopi, a reflection of the escalating cycle of violence in towns and cities across the southeast.

In the neighboring province of Siirt on Wednesday, eight Turkish soldiers were killed by a roadside bomb, the single deadliest strike against the military since the cease-fire collapsed last month. More than 50 security officials, some 400 PKK members and at least seven civilians have been killed since June, according to Turkish officials.

Rights activists fear the shift to urban warfare is putting civilians at increased risk.

“There is reckless firing on both sides,” said Andrew Gardner, a Turkey expert at Amnesty International, who is currently investigating the civilian toll from renewed conflict in the southeast.

The mounting instability has also spread to outside the Kurdish region to Turkey’s largest city Istanbul. It is threatening to destabilize a key North Atlantic Treaty Organization member at pivotal time.

Since the June election, the major parties have failed to agree on a ruling coalition, plunging the country into political uncertainty. Mr. Erdogan said Wednesday that the country was rapidly headed to a snap election as coalition talks collapsed ahead of a Sunday deadline.

At the same time it launched airstrikes against the PKK, the government also deepened its commitment to fighting Islamic State. It agreed to allow the U.S. to use bases on its soil to strike the militants across the border in Syria and decided to join in the airstrikes.

Kurdish youth say the state gave them only two options: to assimilate into Turkish society or take up arms.

But in areas like Silopi, the view that the president is seeking to sideline Kurds from politics is gaining traction.

“He is taking revenge on us Kurds. But we must soon get back to the negotiation table, because things are getting out of control,” said Silopi Mayor Seyfettin Aydemir. “The hatred among the youth is growing as time goes by.”

Write to Ayla Albayrak at ayla.albayrak@wsj.com