Iraqi military officers said many families in the religiously-mixed city of Nasser Wa Salaam have moved to neighbourhoods where their sect is in the majority. Their homes are either deserted or exchanged with trusted friends of the other sect.
"Friends from different sects say, 'Let's trade houses, then we'll move back when things settle down'," said Brigadier-General Abdullah Abdul Kareem Abdul Sattar, commander of Iraqi forces in Nasser Wa Salaam, a city of about 80,000 people.
About 1,500 more families have fled the city, officers added.
The trucks that move between different neighbourhoods loaded with household goods illustrate the sectarian divide.
"All day long you'll see trucks moving back and forth to where they think it's safer, but they're taking those grudges with them," Abdullah said.
Persuaded to stay
Iraqi soldiers have tried to persuade residents to stay, but influential tribal and religious leaders have encouraged many to leave.
"The best we can do is stop them at checkpoints, and assure them of their safety and security," Abdullah added.
So far the city has escaped the worst of the sectarian attacks but the problem is not isolated to Nasser Wa Salaam.
In the nearby mostly Sunni neighbourhood of Abu Ghraib on the western edge of Baghdad, homes have been abandoned by Shia.
A tent city in Falluja is now home to hundreds of mostly Sunni Arab families who escaped Baghdad to avoid Shia death squads and militias.
Residents of many areas have reported that they have seen or heard of leaflets warning that they will be killed if they do not leave.
Abdullah's own son was recently tortured and killed.
"For people my age, we never had this. We never knew what sect we were. We interacted with each other, intermarried. This is something new and it's a bit of a shocking situation," he said.
About 800 new families have also moved into the city - thought to be mainly Sunni Arabs who feel safer in the Sunni-dominated western half of Iraq. Most of the families that left are thought to be Shia.
The city was one of the first places west of Baghdad to be handed over from US control to an Iraqi army unit. The brigade now in control of the area is considered one of the best trained in the western region.
The Iraqi soldiers are trying to tame fears and gauge the extent of the migration. Soldiers stop trucks loaded with furniture to record where people are moving to and from. They are also surveying the changing neighbourhoods and trying to locate abandoned homes.
Nationwide, 26,858 families - about 160,000 people - have been displaced by sectarian violence since the February 22 bombing of a Shia shrine in Samarra, according to Abdul-Samad Rahman, the Iraqi migration minister.