ERBIL, Iraq — As security forces bear down on Mosul, the Islamic State has moved hundreds of civilians from villages around the city to use as human shields, and the United Nations said the militants may have killed nearly 200 people. To the east, near the Kurdish-controlled city of Kirkuk, Sunni Arabs who fled there to escape violence are being forcibly displaced as local officials worry about terrorist sleeper cells.

The toll of an intensifying war does not end there: A sulfur plant set on fire by the Islamic State has sent dozens of people for treatment for respiratory problems, and several journalists have been hurt, and two killed, covering the fighting. And a wayward attack — either an artillery shell or an airstrike —– hit a Shiite mosque in northern Iraq, killing more than a dozen women and children.

Just 10 days into the long-awaited offensive to retake Mosul from the Islamic State, the campaign has unleashed a fresh set of horrors across a wide stretch of the country. Although the government’s military operation itself is largely meeting its goals in progressing toward the city, the turmoil surrounding it is a sign of just how difficult it would be to secure a lasting peace across Iraq’s many divisions even after a victory.

The human toll and factional distrust are early examples of the complex humanitarian crisis that many believed would unfold once the fight to oust the Islamic State, also known as ISIS or ISIL, from its last major Iraqi stronghold began in earnest.

United Nations officials said Tuesday that Islamic State fighters had killed close to 200 people, including civilians and children, in and around Mosul in the past week. Among them were said to have been 50 former Iraqi policemen held in a building outside Mosul on Sunday, Rupert Colville, the spokesman for the United Nations human rights high commissioner, told journalists in Geneva.

The statements coming from Geneva track broadly with what local Iraqi officials and residents told The New York Times in recent days as the military operation around Mosul intensified.

Mr. Colville said that in one case, several women and children, including a 4-year-old, who were being held as human shields by Islamic State fighters were suddenly gunned down by the militants, possibly because they were lagging behind the group.

He also said that last week the Islamic State was reported to have executed 15 civilians in the village of Safina, about 28 miles south of Mosul, supposedly to terrify other residents.

“ISIS has lost hundreds of its members from airstrikes when they withdraw, so now they are forcibly displacing the residents of villages they are leaving and using them as human shields,” said Abdul Satar, a military expert and former Iraqi Army general.

Aid workers are bracing for the possibility that hundreds of thousands of civilians could flee Mosul once the fighting moves into the city, and are working to stockpile supplies and set up camps in the desert. So far, about 9,000 people have fled the fighting as Kurdish and Iraqi government forces have moved to secure villages around the city, according to the United Nations. The figure would be far higher had the Islamic State not begun forcing residents of those villages to relocate toward Mosul.

Supplies were set out Monday near Qaiyara, south of Mosul, for Iraqis expected to be displaced by the government operation to retake Mosul from the Islamic State. Credit Bulent Kilic/Agence France-Presse — Getty Images

But as the United Nations has worked to protect civilians, it has at times been undermined by the Iraqi security forces. Recently, a unit of the federal police, whose leadership is closely aligned with a major Iran-backed Shiite militia that has been accused of abuses against Sunnis, raided a camp for the displaced, threatening residents and making off with tents, latrines, water tanks and other supplies, according to United Nations officials.

On the military front, the Islamic State has managed to launch two attacks on cities far from Mosul, diverting the attention of Iraqi security forces and the warplanes of the American-led coalition.

In recent days, the Islamic State has attacked Rutba, a desert town in Anbar Province not far from the Jordanian border, seizing some neighborhoods. That came quickly after last week’s brazen assault on Kirkuk, a Kurdish-dominated city south of Mosul that also has a large Arab population. Dozens of fighters moved on the city in the early-morning darkness, setting off gun battles that lasted for more than a day.

Kurdish officials in Kirkuk responded by forcing out hundreds of Arab families who had sought safety there, according to United Nations officials and local residents, as they feared that terrorists had sneaked into the city posing as displaced civilians.

The move is likely to raise tensions in the divided city, and has echoes of Saddam Hussein’s efforts to forcibly change the demographic balance of oil-rich Kirkuk by moving out Kurds and replacing them with Arabs.

Arab residents of Kirkuk who were interviewed on Tuesday reported that armed Kurdish security agents had removed families from homes and forced them to move to camps. They said several homes were also destroyed, in what appeared to be a methodical attempt to force out as many Arabs as possible.

Sheikh Ismail al-Hadidi, an Arab leader in Kirkuk, said that the local authorities were exacting collective punishment on Arabs for the crimes of the Islamic State, even though many helped security forces put down the attack last week.

“We call on the local government and local security agencies to deal with the consequences of the attack and not resort to collective punishment by deporting Arabs and destroying their houses,” he said.

On the day of the assault on Kirkuk, as aircraft from the American-led coalition were diverted to help fend off the attack, a strike hit a Shiite mosque in nearby Daquq, killing at least 13 women and children at a funeral, according to Daquq’s mayor, Amir Khokram, and Human Rights Watch.

Local officials blamed the American-led coalition, but United States military officials have said the episode was not the result of a coalition airstrike. Some have suggested that an artillery shell hit the mosque, but Human Rights Watch said the evidence it had seen “is consistent with an airstrike.” The Iraqi forces are also conducting airstrikes, and Human Rights called for a thorough investigation.

Two Iraqi journalists covering the fighting have been killed by Islamic State snipers, and several others have been injured, including a New York Times photographer who was wounded by shrapnel from a car bomb last week.

Citing safety concerns, the Iraqi government said recently that it would begin restricting journalists’ access to the front lines. But on a visit near the front line east of Mosul this week, near the recently liberated city of Bartella, it was possible to get past checkpoints and move closer to the fighting.