The avenue was quiet except for the whirring sound of the cranes and thud of the barriers as they touched the ground. Contractors operated the cranes, but American soldiers transported the barriers on trucks and directed their placement.

The team building the barrier was protected by M-1 tanks, Stryker vehicles and Apache attack helicopters. As the workers labored in silence, there was a burst of fire as an M-1 tank blasted its main gun at a small group of fighters to the west. An Apache helicopter fired a Hellfire missile at a militia team equipped with rocket-propelled grenades, again interrupting the night with a thunderous boom. A cloud of dark smoke was visible in the distance through the Stryker’s night-vision system.

Concrete barriers have been employed in other areas of Baghdad. As the barriers were being erected in other neighborhoods, some residents said they feared being isolated. But walls have often proved to be an effective tool in blunting insurgent attacks.

American and Iraqi forces here say they have been battling Iranian-backed groups and militia fighters who support Moktada al-Sadr, the anti-American cleric. Much of Sadr City has become a sanctuary for such militias. Prime Minister Nuri Kamal al-Maliki’s recent offensive in Basra led to an increase in rocket attacks on the Green Zone.

Many of the Shiite militias that the American and Iraqi forces have been battling in the Tharwa area of Sadr City in the past several weeks have been infiltrating from the north. Al Quds Street has become a porous demarcation line between the American- and Iraqi-protected area to the south and the militia-controlled area to the north.