Islamic State fighters forced residents into buildings, then tried to draw an attack in the hope that a rising civilian deaths would lead to fewer airstrikes, an American spokesman said.