TALL AFAR, Iraq, Sept. 2 -- It was a clear and quiet dusk, with only the call to prayer echoing from minarets across this city, when a roadside bomb blasted an M1-A1 Abrams tank, shaking nearby buildings and filling the indigo sky with a plume of black smoke.

Crackling small-arms fire clanged off the damaged vehicle from an adjacent house. U.S. soldiers answered with increasingly violent volleys -- .50-caliber machine gun bursts, tank rounds and a TOW missile -- but the shots from inside the house kept coming. Finally, an ear-splitting succession of five rounds from the tank's big gun reduced the building to flaming rubble and lit the empty streets with white sparks from exploding power transformers.

In the largest urban assault since the siege of Fallujah last November, more than 5,000 U.S. and Iraqi troops entered this northern city before dawn Friday. But the 45-minute firefight at day's end suggested that the insurgents who have controlled much of Tall Afar for almost a year would not relinquish it easily.

"We knew they were going to fight," said Pfc. Johnny Lara, a machine gunner from Blue Platoon, Eagle Troop, 2nd Squadron of the Army's 3rd Armored Cavalry Regiment, who watched the clash with a reporter from a rooftop about 100 yards away. "Now it's a fight."

During the course of the day, at least 30 insurgents were killed as U.S. troops conducted house-to-house searches in the baking sun. Apache attack helicopters that circled the city of 250,000 all day killed 27 people, including eight who were attempting to conceal roadside bombs in old tires, commanders said. No American or Iraqi army casualties were reported.

Set on an old smuggling trail that winds though pastoral plains about 40 miles from the Syrian border, Tall Afar is a key logistics hub for insurgents operating across northern Iraq, military officials say. Like the string of towns a few hundred miles to the south in Anbar province, where Marines have launched a half-dozen offensives since early May, Tall Afar is considered a staging point for operations essential to sustaining an insurgency, such as trafficking of men and arms and providing safe accommodations for fighters.

One year ago this month, U.S. and Iraqi forces stormed into the city after a series of roadside bomb attacks on their supply convoys. But soon after that offensive -- in a pattern repeated elsewhere in Iraq -- the bulk of the troops withdrew from the region, leaving about 500 behind to police a vast swath of northwestern Iraq, including Tall Afar and a more than 100-mile stretch of the Syrian border.

By the end of October, the insurgents had returned, stronger than ever and with more foreign fighters backing them. They quickly reasserted control over the city through intimidation -- kidnappings and beheadings -- and a highly effective campaign aimed at persuading Tall Afar's majority Sunni Turkmens that the U.S. operation was directed at them.

"The September operation basically made people angry, which the insurgents were able to take advantage of," said Maj. Bob Molinari, 35, of Fort Carson, Colo., the planning officer for the 3rd Armored Cavalry, which was shifted from Baghdad in late April as the situation here deteriorated. The offensive "had the opposite effect than was intended. We created a power vacuum and they filled it."

All but a few dozen local police officers quit, many siding with the insurgents. The city's imams and schoolteachers were replaced with newly arrived adherents of radical Islamic sects, U.S. military commanders and local residents said. After a year of violence, as many as half of Tall Afar's residents have fled to outlying areas, leaving behind a ghost town of shuttered shops and charred hulls of vehicles.

"This place is not a town, it's a cemetery. It is the lowest of the low in Iraq," Najim Abdullah Jabouri, a former general in Saddam Hussein's army, said in an interview the day before the operation began. "It needs to be cleaned out."

Jabouri was brought here from Baghdad by U.S. and Iraqi forces four months ago to serve as Tall Afar's police chief.