BAGHDAD
— In response to a two-week crackdown by the US military, Iraqi insurgents are switching tactics from hit-and-run raids against American troops to attacking the coalition's vulnerable allies.

US military officials say that the number of attacks against coalition forces has dropped since Operations Iron Hammer and Ivy Cyclone II began in Baghdad and the volatile Sunni triangle two weeks ago. Yet at least 104 coalition troops died in Iraq in November, 79 of them Americans, making it the bloodiest month since the war began.

The paradox of reduced attacks but increased casualties underlines the difficulties a high-tech conventional army faces when confronting lightly armed but determined guerrilla fighters who hold the initiative, choosing when, where, and how to strike before vanishing into a population increasingly hostile to the US-led occupation. And, analysts warn, the US military's displays of force and intrusive counter- insurgency measures are more likely to further alienate Iraqis rather than deter militants.

"It's all about hearts and minds," says Timur Goksel, a university lecturer in Beirut who served with UN peacekeepers in south Lebanon from 1979 to May this year. "Above everything, even reliable intelligence, you need the cooperation of the locals. Restrictive measures won't work, they'll actually backfire," Mr. Goksel says, drawing on his experience witnessing similar difficulties faced by the Israeli army in combating insurgents during its 22-year occupation of south Lebanon.

On Saturday, Lt. Gen. Ricardo Sanchez, the top US military commander in Iraq, said that more aggressive tactics by the coalition forces has helped reduce the number of attacks against coalition forces.

"In the past 14 days, we have seen the daily average of engagements throughout the country decline by over 30 percent," he told a news conference in Baghdad.

He added that the average number of attacks was down to 22 a day, compared with as many as 50 a day two weeks ago.

But within hours of his remarks, seven Spanish intelligence officers were killed in an ambush at Latifiya, 18 miles south of Baghdad, two Japanese diplomats were shot dead near Saddam Hussein's hometown of Tikrit, and two US soldiers were killed near the Syrian border. Two South Korean contract workers were also shot dead Sunday near Tikrit, and a Colombian employee of the US firm Kellogg Brown & Root was slain north of Baghdad on Saturday.

Further north, around Tikrit, the 4th Infantry Division conducted Operation Ivy Cyclone II, which saw artillery and aircraft bombing targets in a display of force not seen since President Bush announced on May 1 the end of major fighting.

The operations came as the number of attacks and military casualties were on the increase, creating pressure on the coalition to react.

"There was a lot of talk in the media that we were being too defensive and not offensive," says a US Army officer in Baghdad. "We took the increased intelligence we have been receiving and massed our firepower and went after the terrorists to show them that we are here to stay and make them pay for their actions."

Dozens of suspects have been arrested, hundreds of weapons seized, and bomb-making factories uncovered in the round-ups. But the Iraqi militants have responded to the crackdown by shifting the focus of their attacks away from Baghdad and the Sunni triangle toward the north and the south of the country. The attacks are also directed increasingly at softer targets - the Iraqi police and civil-defense troops who are taking over routine security duties from coalition forces.

"In the past, attacks against coalition forces were predominant," Paul Bremer, the US overseer in Iraq, said last week. "Now terrorist attacks against Iraqis are occurring regularly. This is a repugnant but not unexpected tactic."

General Sanchez said that the insurgents have carried out 156 attacks against the Iraqi security forces during the past month. Suicide bombings and shootings have killed more than 10 Iraqi policemen in the past week.

The show of overwhelming force in Operations Iron Hammer and Ivy Cyclone II had a psychological dimension as well, says Lt. Alexander Kasarda of the 1st Brigade, 1st Armored Division, which controls most of the eastern half of Baghdad.

"If you can change a guy's mind by seeing an AC-130 or an Apache in action, if he says: 'You know, I think I'm in the wrong business,' then isn't that better than having to kill him?" he asks.

But Iraqis say they have seen enough wars and violence not to be intimidated by demonstrations of US firepower.

Abu Mohammed shakes with anger as he recalls the 12-hour air barrage two weeks ago against a house and riverbank near his home on the edge of Tikrit.

"The explosions cracked my house. What do they think they were doing? They punish the whole neighborhood when we have done nothing," he says. "They drive their tanks through the marketplace and point their guns at us. They are treating us like savages."

Part of the problem is that the apparatus of occupation is impossible to escape. Main roads in Baghdad are sealed off with concrete blast walls and razor wire, and checkpoints are on the increase. The city's principal buildings are in the hands of the coalition forces and resemble heavily defended military forts. Patrolling Army humvees with grim-faced soldiers manning rooftop machine guns are an intimidating presence. Helicopters clatter overhead. Lengthy military convoys cause traffic jams and frustration on the highways.

The coalition faces the classic dilemma of how to balance its own security concerns as a benign occupier with the need to offer a sense of stability for the occupied.

The coalition says it is trying to mount less threatening searches. "We knock on doors and ask to speak to the man of the house," says Lieutenant Kasarda. "We explain that we need to come inside and search. If we have sniffer dogs, we give them a chance to move holy items. We are not here to sacrifice the dignity of the Iraqis."

But Ahilla Abdel-Wahab has a different story to relate after US troops arrested her husband, Suhaib Amine, two weeks ago during a house-to-house search in the rundown Hara district of central Baghdad.

"They terrified my family. There were more than 20 soldiers in my house. They broke the television, the CD player, they pulled down bookshelves and scattered clothes everywhere. They took 50,000 dinars [$25] I kept in a box. They arrested my husband and I haven't seen him since. I don't even know where he's being kept. Nobody has come and told us anything. Look, they even broke my Koran. A soldier stood on it and tore it in two," she says, brandishing a freshly ripped copy of the Islamic holy book.

Her story was impossible to confirm, but her anger was clearly genuine. Ms. Abdel-Wahab admits that the soldiers were more polite to her neighbors. But in this impoverished neighborhood, it is what happened to her family that is remembered by local residents.

As Abdel-Wahab tells her story, two American humvees trundle down the narrow street outside her home, spurring several teenagers to swear out loud at the soldiers in Arabic. "If the local teenagers and kids are not on your side, forget it," says Goksel, the former UN peacekeeper.

Operation Iron Hammer may have succeeded in reducing the number of attacks in Baghdad, but the tough measures appear to have created many fresh enemies for the coalition. "I used to feel sympathy for the soldiers," says Mrs. Abdel-Wahab. "They looked young and were away from their families. But not anymore. If the people had some mercy for the Americans before, they don't anymore. God bless the resistance."