The walls are constructed of cinder blocks, steel and concrete. Some have gates for pedestrian traffic. Others evoke the oppressive days of the Berlin Wall — towering concrete panels lined up in a row, and impassable.
The barriers snake through Tuz Khurmatu, turning it into a city of walls.
In years past, walls went up to protect against car bombs. Then Shiite Turkmens erected walls to guard against Islamic State after its resurgence in 2014. Now even after the jihadis have been driven out of the city, the walls still stand, and Tuz Khurmatu remains a flash point with an unstable melange of sects and ethnicities. Once united to fight Islamic State, Kurds, Turkmens and Arabs resumed viewing each other with hostility and suspicion.
"Without a doubt, Tuz Khurmatu is a case study for Iraq 2.0. It's the most violent, most divided place in the country. You have so many layers of conflict," said Michael Knights, a senior fellow at the Washington Institute for Near East Policy.
The Shiite Turkmens had erected walls because the Islamic State jihadis, who adhere to a strict Sunni doctrine, believe Shiites are apostates who should be killed.
Turkmens also accused the mostly Sunni Kurdish residents of allowing, if not colluding with, the jihadis to make the city more Kurdish. Turkmens started erecting more walls, but not always with Islamic State in mind.
Mohammad Kawthar, a Turkmen judicial councilman in the city, said, "We were forced to turn all the Turkmen neighborhoods into prisons." But the walls offered protection.
Arab tribesmen, meanwhile, are viewed with suspicion by both Turkmens and Kurds. Complicating matters further is the city's location, about 40 miles south of the oil-rich city of Kirkuk, and the presence of Turkmen paramilitary groups called the Popular Mobilization Forces.
In the city, explained Knights, Turkmens stand against the Kurds, "but you've also got a layer of powerful Popular Mobilization Forces fighting against a Kurdish oil-smuggling mafia."
The disputes dividing the various groups were momentarily set aside in 2014 when Islamic State, also known as ISIS, launched an offensive.
"The country was not ready to defeat ISIS in a way that would usher in post-conflict stability. It defeated it, sure, but only because it had to rely on a coalition of foreign militaries and dozens of militias," said Ramzy Mardini, a non-resident fellow at the Atlantic Council.
"It's too bad ISIS wasn't an invading foreign country," Mardini added. "Instead of the war solidifying Iraqi nationalism, it led to a hardening of ethnic and religious identities."
In Tuz Khurmatu, those identities solidified into physical borders threading throughout the city.
Protective walls can be found throughout Iraq, but here they are a constant feature. Initially, some were low concrete barriers designed to block traffic — the car bombs. But then people began building walls 8 feet high or taller, sometimes right in the middle of a thoroughfare.
Some barriers are nothing more than a wire fence, others elaborate constructions topped with barbed wire and sandbags and equipped with gates for pedestrian traffic that can be locked at night. Kurdish merchants abandoned the city's central market, once a place where business trumped sect, and created their own commercial strip on the Kurdish side of the city.
Tensions took on new life last September when Kurds held a referendum calling for independence. And when the Iraqi army swept into Kirkuk, the Turkmens kicked the Kurdish peshmerga out of Tuz Khurmatu and took charge of the city's administration — a change that people like Abbass Maarouf, a 38-year-old medical assistant, celebrated.
"I could finally visit my land near the city for the first time in 14 years," he said. "The Kurds had taken it and they said 'These lands are all ours.'"
Hostilities took a deadly turn in October when Turkmens and Kurds began hurling dozens of mortars and artillery shells at each other. At least 11 residents were killed, and dozens more wounded, according to the rights group Amnesty International.
The rights group said that when the peshmerga were routed, tens of thousands of Kurds fled their neighborhoods; Turkmens and the Popular Mobilization Forces followed right behind, burning and looting houses of Kurdish officials and security personnel.
The government in Baghdad, meanwhile, has sought to reassure the estimated 35,000 displaced Kurds who escaped. In the days after October's flare-up, it assigned government troops to protect Kurdish neighborhoods.
"We're begging the Kurds to stay," said one major posted at the entrance to the Kurdish-dominated Jumhuriya neighborhood. His underlings handed out yellow and blue papers with numbers to call "in case of any attack."
Tensions remain high, especially near the walls. When a visiting reporter crossed one barrier, a pair of Turkmen boys chased after him, shooting their AK-47s in the air. They later boasted that they had blown up the homes of Kurdish politicians who had supported the independence referendum.
Members from one group will sometimes slip into the other's territory to unleash havoc. This creates unique hazards for some residents because the walls don't always split neighborhoods neatly. Turkmens who ended up on the "Kurdish side" of a barrier spray-painted "Turkmen" on the entrance of their house in the hope of avoiding its destruction by fellow Turkmens who cross over to attack Kurds.
In January the Iraqi government said it would investigate the violence in Tuz Khurmatu, but it's unclear what, if anything, will come of that. Iraq's conventional army is overstretched and, according to Mardini of the Atlantic Council, there is little hope that Baghdad can "demonstrate enough control over armed forces or have enough armed forces to govern the area."
"Tuz Khurmatu is a prime example of state weakness. The Iraqi government is too weak to reassert its political authority there," he said. "It's becoming clear that a post-ISIS Iraq will not experience a period of stability."
The bitterness dividing Tuz Khurmatu was captured one day at a traditional wedding feast. Long tables were set out with rice and spiced meat. But the celebration played out in the shadow of a cinder-block wall dead-ending a street linking Turkmen and Kurdish districts.
Akram Tarzi, a resident of the Turkmen side, was in no mood to celebrate. He glowered as his 11-year-old son awkwardly limped to a white plastic chair.
"The Kurds shot him in the leg. They attacked us, came to steal our land and remove the Turkmen identity here," he said, turning to point at the wall.
Peace negotiations were held, but had stopped. The fighting, Tarzi predicted, "will start again. We all know it."
He was right. That wedding feast occurred more than a year ago, long before more violence in the city of walls.
Bulos is a special correspondent.