Gathering on a small basketball court outside battalion headquarters, 450 soldiers of the 1st Cavalry Division bowed their heads in prayer to begin Independence Day celebrations at this dusty outpost on the edge of Sadr City.

Then, as the morning warmed toward searing midday heat, 11 soldiers stepped forward to receive Purple Hearts for battle wounds suffered in the past few weeks, including the battalion commander. Hundreds more were given Combat Infantryman Badges before Sgt. Eric Bourquin, a lanky 24-year-old from College Station, Tex., stepped forward to accept a Bronze Star for meritorious service decorated with a small "V" pin for valor.

On April 4, Bourquin helped seize and hold a three-story building at a moment when it appeared his platoon would be overwhelmed by members of a Shiite militia that had risen on the filthy streets of Sadr City, a Baghdad slum. Nearly a third of Bourquin's 35-member platoon was wounded that day, one of them fatally. Sgt. Yihjyh L. Chen, perched in the gunner's nest of a Humvee, was killed when a bullet passed through his lungs and heart. Six other soldiers from the battalion died in the ensuing battle.

"That's what patriotism is all about," said Bourquin, a member of 1st Platoon, Charlie Company.

In this simmering combat zone, the current demands and fresh memories of war left little room for a traditional Independence Day commemoration. The painful three-month anniversary overshadowed July 4 celebrations for much of a frontline battalion seasoned by street fighting that has killed eight of its soldiers and wounded scores more.

Like troops elsewhere in Iraq only days after the handover of political authority from the occupation, the unit -- the 1st Brigade's 2nd Battalion, 5th Cavalry Regiment -- marked the American holiday in quiet ways to avoid offending Iraqis outside the base boundaries. From the predawn mortar rounds that fell just outside the walled perimeter to buzzing helicopters overhead, the day felt like any other to many soldiers who spent it among the dusty lots, air-conditioned tents and dim barrack rooms across this former prison camp.

The touches of Americana were kept shielded on orders from camp commanders, who feared inflaming a neighborhood calmer than it has been in weeks but uncertain to stay that way. The only U.S. Army patrols that leave the camp now include members of Iraq's National Guard, a more presentable face to the roughly 2 million Iraqis who live in the slum's low concrete houses.

Stands of crossed American flags decorated tables in the tent that serves as the camp chow hall, and red, white and blue ribbons swirled around its posts. "The Patriot," starring Mel Gibson as the heroic anti-British guerrilla leader during the War of Independence, was the matinee on the Armed Forces Network that played to small groups in the command post common room. A dinner of fried chicken, ribs, potato salad and corn on the cob ended with a card-table-size cake depicting the American flag. No barbecue, no beer.

But the grease board at the entrance to the 1st Platoon barracks displayed special July 4 instructions in red marker: "You cannot display an American flag outside the FOB," or forward operating base. A tank commander from another unit failed to follow the order and flew a small flag from his M1 Abrams. He received a sharp chewing out. A makeshift fireworks display, using flares and illumination rounds, was also rejected because, in the words of Lt. Pete East, "we didn't want it to look like we were gloating."

"Unfortunately, it's just kind of another day. There's pride in what we do, but it just kind of rolls into everything else," said East, 27, of Norwich, Conn. "You always remember the Fourth of April, though. Nobody will ever forget that."

At 5:30 p.m. on April 4, officers of the 1st Cavalry and 1st Armored Divisions gathered in the command post here to celebrate the transfer of military responsibility for Sadr City, the neediest of Baghdad's neighborhoods, where the U.S.-financed reconstruction effort had made few inroads over the previous year. A column of four Humvees under Lt. Shane Aguero, the 1st Platoon commander, made its way back to the camp to join the festivities.

Passing the offices of Moqtada Sadr, an anti-American Shiite Muslim cleric who has a large following in the slum, Aguero's soldiers encountered 200 armed men. Upon seeing the Humvees, the crowd divided into three groups and scattered into narrow alleys and behind makeshift barricades.

"We started rolling back and forth trying to figure out what was happening, and boom, we got ambushed," said Staff Sgt. Joshua M. York, a burly 26-year-old from San Marcos, Tex., who received his Purple Heart on Sunday morning.

In Aguero's partially armored Humvee, Chen swiveled behind the .50-caliber machine gun on the roof. From below, Aguero heard what sounded like rocks pelting the Humvee when Chen peered down and said incredulously, "They're shooting at us."

"I told him to shoot back," said Aguero, who like many of his men had been in Iraq for less than a month and was stunned by the ambush in a neighborhood that had largely welcomed U.S. forces. Within minutes, Chen slumped through the roof of the Humvee, blood oozing from his mouth.

"Honestly, when I think of this day, I think of it as a three-month anniversary," said York, who usually spends the Fourth of July on Lake Texoma with his family, which now includes Madison, a 1-month-old daughter he hasn't met. "You think of Sergeant Chen."

Born in China, Chen had become a U.S. citizen only months before he was killed in Sadr City. His family lives in Guam, his fellow soldiers said, and they described him as a man of unfailing generosity and camaraderie whose passion for international politics and debate made long, hot Humvee rides pass more quickly.

"And he was happy," said Aguero, 28, of Temple, Tex., who was awarded a Purple Heart several weeks ago for shrapnel wounds he received April 4. "Even when Sergeant Chen wasn't happy, he pretended to be for everyone else. He'd do anything in the world for you."

Aguero is a common type in the Army: a man who has to think long and hard to name his home town. His father retired from the Army as a command sergeant major after 24 years of hopscotching from post to post. His wife's father also made his career in the Army, and Aguero said that upbringing has brought them a particular understanding of July 4 and other holidays of special significance to the U.S. military, especially those serving in foreign war zones.

"These days are for me," said Aguero, who graduated with a degree in international relations and global economics from St. Edward's University in Austin. "I'm not a big flag-waving patriot, and I don't need it. We celebrate these holidays privately. We know why they exist, as times to remember."

Sadr City quieted in the days leading up to the handover, and two consecutive nights of mortar attacks on this camp are the only signs of potential trouble ahead. Sadr, the Shiite cleric, however, has said in recent days that the occupation is not over because U.S. troops remain in the country. He has called on his followers to resist, although so far there has been little evidence of them doing so.

Aguero's platoon rested for much of the day. Then, near twilight, it pushed past the camp's maze of barriers and checkpoints to escort a military police unit back to camp.

"Every time you roll out of these gates, April 4 is what's on everyone's mind, not the back of it but the front," Aguero said.

Before leaving his room in the dorm-like barracks, Aguero gestured toward the screen of his Dell laptop computer glowing at the foot of his bed. A souvenir portrait of Sadr hung overhead.

He closed the e-mail window, leaving a screen saver depicting a podium and seven pairs of beige army boots. A rifle stood behind each pair, capped with a Kevlar helmet. The scene showed the memorial service for the soldiers killed three months ago.

"Those are Sergeant Chen's," Aguero said, pointing to the empty pair on the far left. "What do you think I'm thinking about today?"

Lt. Shane Aguero, left, leader of a platoon that was ambushed in Baghdad's Sadr City on April 4, spent the Fourth of July reflecting on the deaths of Sgt. Yihjyh L. Chen and other battalion members.Soldiers of the Army's 1st Cavalry Division enjoy a performance by comedian Dan Smith during a holiday program at a camp near Baghdad.