Yahya Salah, whose neighborhood in eastern Mosul was liberated in November, described how Iraqi troops were just streets away when Islamic State fighters forced their way into his home, armed with a jackhammer. They herded Mr. Salah’s family into one of the bedrooms. From behind the closed door, Mr. Salah said, he heard a deafening sound and realized the fighters were drilling a hole.

“They worked without stopping — when one got tired, another took over, and they dug a hole that was 1.5 meters wide,” said Mr. Salah, who said his family had been locked in the bedroom for three days. “When we said we were thirsty, they threw water bottles at us.”

He said the fighters had left at noon on the final day. The Iraqi Army arrived at sunset and unlocked the door. When the family stepped into the rest of their house, they found ceiling-high piles of dirt in three of their four bedrooms and a hole in the living room floor. The tunnel the fighters had dug stretched for dozens of yards, allowing the terrorist group’s foot soldiers to slip away.

Residents have shown reporters similar tunnels throughout the eastern part of the city, and officials expect the same in western Mosul. A photo essay published this weekend by the Islamic State, titled “Life of Fighters South of Mosul,” shows militants cooking a meal on a kerosene stove, reading the Quran and praying inside a tunnel wide enough for five men to stand side by side.

At the same time, the Islamic State has become better at the use of small drones, which are available off the shelf in malls across the region, including in Erbil, the nearest major city to Mosul. They use the drones to pinpoint army positions and to target them, and recently recovered Islamic State documents show how the group has cobbled together its own drone program. Iraqi forces say they frequently see the aircraft, two to four feet long, overhead, whining like lawn mowers. Then, 30 minutes later, they take incoming fire at that location.

“Mosul would be a tough fight for any army in the world, and the Iraqi forces have risen to the challenge,” Lt. Gen. Stephen Townsend, the commander of the American-led effort against the Islamic State, said in a news release from United States Central Command announcing the beginning of the operation. Some of the 450 American advisers on the ground in Iraq are helping Iraqi officers plan and carry out the offensive.

Reached by telephone, residents in western Mosul described the elation they felt at the approach of government troops. “All we have left to eat is tomato paste. We are eating it with salt,” said Umm Anwar, 41, who asked to be identified only by her nickname. “We are ready to kill ISIS ourselves with knives, or by biting them, because we are in so much pain.”