WASHINGTON — In Sinjar, Iraq, fighters from the Islamic State carved a network of tunnels. To defend Hawija, Iraq, they erected a 10-foot sand wall. And virtually everywhere they have surrounded their positions with dense minefields of I.E.D.s, backed by machine guns, mortars and suicide bombers.

While a huge act of terrorism in Paris drew the world’s attention to the Islamic State, which claimed responsibility for the attacks, the group’s primary focus in Iraq and Syria has been a far more traditional military goal: the capture and defense of cities and towns. And in doing so the Islamic State has developed a hybrid style of warfare that combines insurgent and conventional military tactics — vehicles full of explosives used as rolling bombs, and trenches that would be familiar to students of World War I.

Those tactics are being put to the test in Ramadi, Iraq, where an estimated 300 to 400 fighters for the Islamic State, and several hundred additional supporters, have squared off against about 10,000 Iraqi troops. The militant group’s ability to construct elaborate defenses in Ramadi — and to cover them with sniper, machine-gun and mortar fire — has slowed the American-supported campaign.

To help the Iraqis retake the city, the United States has provided their forces with armored bulldozers and special mine-clearing equipment in which a cable festooned with explosives is fired across the battlefield and detonated. Islamic State fighters have tried to hide from the prying eyes of American drones by stringing bedsheets between rooftops.