A network of tunnels built by Islamic State has been discovered under the Iraqi town of Sinjar - complete with sleeping quarters, wired with electricity and fortified with sandbags.
Footage obtained by the Associated Press shows militants stashed boxes of US-made ammunition, medicines and copies of the Quran on shelves.
The tunnels were uncovered by Kurdish forces that took the city in north-western Iraq earlier this month after more than a year of IS rule.
Shamo Eado, a Sinjar commander from the Iraqi Kurdish fighters known as peshmerga, said: "We found between 30 and 40 tunnels inside Sinjar. It was like a network inside the city."
He added: "Daesh dug these trenches in order to hide from air strikes and have free movement underground as well as to store weapons and explosives. This was their military arsenal."
The video, shot by a freelancer touring the town with Kurdish fighters, shows two tunnels running for several hundred metres, each starting and ending from houses, through holes knocked in walls or floors.
The narrow tunnels, carved in the rock apparently with pneumatic drills or other handheld equipment, are just tall enough for a man to stand in.
Rows of sandbags line sections of the walls, electrical wires power fans and lights and metal braces reinforce the ceilings.
One section of the tunnel resembled a bunker. Dusty copies of the Quran sit above piles of blankets and pillows. Prescription drugs - painkillers and antibiotics - lie scattered along the floor.
In another section of the tunnel, the footage shows stocks of ammunition, including American-made cartridges and bomb-making tools.
IS has been digging tunnels for protection and movement throughout the territory it controls in Iraq and Syria, even before the US-led coalition launched its campaign of air strikes against the group more than a year ago.
"This has been part of Isis' strategy from the very beginning," said Lina Khatib, a senior research associate at the Arab Reform initiative, a Paris-based think-tank. "Isis has been well prepared for this kind of intervention."
Islamic State took control of Sinjar in August 2014, killing and capturing thousands of the town's mostly Yazidi residents.
Yazidis, a religious minority in Iraq with roots that date back to ancient Mesopotamia, are considered heretics by IS.
Hundreds of women are thought to still be in IS captivity, and those who have escaped say many Yazidi women are forced to convert to Islam and marry IS fighters.
After pushing IS out of Sinjar, peshmerga officials and local residents uncovered two mass graves in the area.
One, not far from the city centre, is estimated to hold 78 elderly women's bodies. The second grave, uncovered about nine miles (15 kilometres) west of Sinjar, contained between 50 and 60 bodies of men, women and children.
Mr Eado said that as Kurdish forces clear Sinjar of explosives, he expects to find more tunnels and evidence of atrocities.
"It's just a matter of time," he said.