Children walked around in unruly clusters here, wearing navy blue-and-white uniforms following the start late last month of a school year delayed by an Iraq once again at war.
Shoppers lingered to buy vegetables and live chickens at stalls at a busy public square, as a dozen uniformed Iraqi soldiers stationed at the entrance of the open-air market looked on.
For a city said to be under mortal threat from the extremists of Islamic State, there was no sign of fear or panic, owing to what residents and officials say is an emerging alliance in Abu Ghraib between Sunni Muslim tribal leaders, Shiite-controlled government forces and Shiite militia.
In a country torn by Sunni-Shiite antagonism, such cooperation is rare.
For the Iraqi government, though, the partnership forged in Abu Ghraib provides a glimmer of optimism as its reeling security forces attempt to regroup and retake territory seized by Islamic State.
The apocalyptic, puritanical group has flourished with the toleration and support of Sunnis aggrieved over what they view as their loss of power at the hands of the Shiite-dominated administration in Baghdad.
But by taking steps immediately to remove sources of Sunni-Shiite friction on Abu Ghraib's streets and avoid resorting to force, the Baghdad government and Abu Ghraib's residents have coalesced -- at least for now -- into an effective barrier to further advances by Islamic State on Baghdad, 25 miles to the east.
"We have controlled the situation in a political way," said Brig. Gen. Saad Maan, an official in the capital's operation command center. "Our first mission is to protect Baghdad and that begins with the outskirts." For both sides, control of Abu Ghraib represents a high-stakes game.
For the rebels, who have sought since May to establish a foothold in the city, it is a potential staging ground to launch attacks on the nearby capital.
For Iraq's security forces, Abu Ghraib is the linchpin of a buffer zone to protect Baghdad's western flank from further encroachment by Islamic State forces, which have gained control of most of Anbar Province where it's located.
The battle for Abu Ghraib was joined in June, when Islamic State swept south toward Baghdad after capturing the northern city of Mosul.
Answering a call to arms by political and religious leaders, powerful pro-Iranian Shiite militias converged on Abu Ghraib to support government forces and help defend the city, which was already being targeted with hit-and-run attacks.
The government faced a sharp disadvantage from the start. Following the U.S.-led invasion in 2003 that deposed Saddam Hussein, Abu Ghraib was the focus of a Sunni-led rebellion against foreign troops and the post-Hussein administration they installed.
With its hard-core Sunni constituency, it became a dependable base for Islamic State's ideological forerunner, al Qaeda, to launch attacks in Baghdad.
Its distinction as a crucible of Sunni anger was solidified with the publication in 2003 of photos showing U.S. Army guards abusing and torturing prisoners at Abu Ghraib prison.
The presence in Abu Ghraib's streets of Shiite militias immediately caused friction and threatened to transform the city into fertile ground for Islamic State to take root, according to Talal Al-Zubaee, a Sunni member of parliament from Abu Ghraib.
Sunnis complained they were harassed and sometimes detained by militia members.
Ahmed Younis, 23, said the Shiite fighters often poured into his stationary shop in the city's Khan Bari market and stole cellphone chargers and mobile phone cards at gunpoint.
When Mr. Younis and other business owners asked local Iraqi military commanders for help, to their surprise their plea wasn't greeted with a shrug of indifference or impotence.
"Almost overnight the militias disappeared from the market and the army became visible," recalled Mr. Younis, as students crowded his shop to buy school supplies.
Critical to the success of the operation was a policy of zero tolerance for any graft and intimidation by members of the joint army-militia force, said a senior army officer in Abu Ghraib.
"We assured people that the army would not allow any wrongdoing in the area, either by security forces or militias," he said.
To reduce friction, Shiite militiamen were barred from policing inside Abu Ghraib and shifted from manning checkpoints inside the city to patrolling the highways that ring it, the officer said.
The support of powerful Sunni tribal leaders also was enlisted. U.S. and Iraqi officials deem the backing of these leaders necessary if the government is to have any success holding off Islamic State, not only in Abu Ghraib but elsewhere in Iraq. "The new Abu Ghraib is not like the old Abu Ghraib," said Saif al-Jumaili, a tribal leader.
"The army changed the way it deals with people and people responded and changed the way they behave towards the army. We trust each other now."
While Sunni-Shiite suspicion is far from disappearing, opposition in Abu Ghraib to Islamic State has galvanized the rare cooperation.
The success of Islamic State, beginning with its lightning advance in June, has sobered residents of the city and other Iraqis alike to the costs of their sectarian rancor. "It was a hard lesson for us as Iraqi people," Brig. Gen. Maan said.
To many Sunnis here, the Shiite-dominated government in Baghdad and the Shiite militias deployed to their city are a lesser evil than what they hear depicted in the testimony of Iraqis who have fled areas of the country controlled by Islamic State, Mr. al-Jumaili said.
"Do you believe that people would trade safety and security for the stupidity and violence of Islamic State?" he said.
Islamic State fighters continue to threaten Abu Ghraib's western outskirts with mortar fire, security officials said, and Fallujah, which borders the city on the west, is firmly under the extremists' control.
But residents of Abu Ghraib say at least in this fight, they are on the side of the Baghdad government. Saddam Hamza, a 40-year-old partner in a construction firm, said work on a housing development in Garma, the district closest to the Falluja border, was stopped for two months because of heavy fighting.
As the military repelled the insurgency, Mr. Hamza offered his construction equipment to help the Iraqi military dig trenches near the front line as the soldiers pushed Islamic State fighters deeper into Fallujah.
Mr. Hamza said he cooperated out of a renewed confidence in security forces and a deep desire to maintain stability in his city.
"We experienced chaos here for years," he said. "All we want is order and that isn't going to come from fighting against the army. We have to work with them."
By Tamer El-Ghobashy