Over the first two weeks of the war, U.S. forces attacking northward across Iraq have been greeted with violent hostility in some cities, flat indifference in others and, lately, in some places, with open arms.

How the war ends is likely to depend on how they are received by the 5 million residents of Baghdad, whose mood will go a long way toward determining whether fighters loyal to Iraqi President Saddam Hussein can mount a successful resistance.

As U.S. forces closed in on the west and east of the capital yesterday, defense officials discussed following an "opportunistic" strategy of probing and testing the capital's defenses to gauge the mood of the population and the likely intensity of resistance.

Under that approach, armored reconnaissance missions, Special Operations actions and precision bombing would be used across the city as ground force commanders consider their options. Those range from pushing aggressively into the city along key roads to establishing a cordon along its perimeter and waiting for reinforcements to arrive, defense officials and analysts said.

U.S. officials seemed to think yesterday that the warm welcome they had counted on from Iraqis, especially in the heavily Shiite Muslim south, finally was emerging. In the southern city of Najaf, regarded by Shiites as the third-holiest city in Islam, U.S. commanders staged a ceremony in which a statue of Hussein was blown up, and they said a Shiite leader had issued a religious edict telling followers not to interfere with U.S. forces.

There were indications that the U.S. strategy in Baghdad would be to seek to capitalize on that trend, beginning by having Marine Corps units approaching from the southeast move into the heavily Shiite eastern part of the capital. There, said Air Force Gen. Richard B. Myers, the chairman of the Joint Chiefs of Staff, the residents of a Muslim sect widely seen as opposed to the Sunni-dominated government "probably will not be friendly to the regime."

While there is a clear political imperative to assume control of the city and remove Hussein's government as quickly as possible, there is no tactical military need to do so, military officials said. The one option U.S. commanders will not take, one retired general said, is a broad assault that could cause significant civilian casualties and losses among U.S. forces.

"You're going to have Baghdad isolated," Myers told reporters at the Pentagon. "You're going to have half the population that probably wants nothing to do with the . . . regime. And then you'll start working at it as you can."

Indicating that a major U.S. assault is not imminent, Myers added that "one of the things you can do is be patient about that." At the same time, he said, the "notion of a siege . . . is not the right mental picture."

The two unknowns in the capital are the degree of resistance and the mood of the residents.

After coming under fierce U.S. attack south of the capital, Republican Guard troops were reportedly falling back into Baghdad, although it was not clear whether they were quitting the fight or regrouping. Even if those units have been degraded by 50 percent, as defense officials claim, that could still leave 30,000 to 40,000 Iraqi soldiers and some armor inside the capital. Backing them up are 15,000 troops from the Special Republican Guard, Hussein's Praetorian guard, established to protect Baghdad and Hussein, as well as 3,000 members of the Special Security Organization, the Iraqi leader's bodyguard force.

Kenneth M. Pollack, a former CIA analyst and now director of research at the Brookings Institution's Saban Center for Middle East Policy, sounded a note of caution, questioning the Pentagon's assessment that the Iraqi government's ability to communicate with and control its military forces has been badly compromised. "There's nothing that I'm seeing in terms of the broad movement of Iraqi forces that indicates to me there's been a significant degradation of their command and control," he said. "In point of fact, the moves they're making are smart moves. They're just making them very slowly."

But even more important to U.S. commanders will be how the population acts. If Baghdad residents aid Hussein's fighters and provide supporting gunfire, the United States will face a long and bloody struggle. "If you have the people en masse fighting against you, in a city saturated with small arms, then you have a real problem," said retired Army Col. W. Patrick Lang, an expert on the Iraqi military.

The course of the war so far indicates that secret police officers and others who are part of the government will fight for Hussein, but that the people won't, said Jeffrey White, a former specialist in Iraqi issues for the Defense Intelligence Agency. "We're not getting true popular resistance from Iraqis," he said. "What we've been getting is resistance from regime elements -- and they are widespread."

In addition, commanders will keep in mind the possibility of a last-minute coup and possible countercoups, which could lead to fighting among Iraqi units, said retired Army Lt. Col. Robert Leonhard, an expert in urban warfare tactics.

"The best thing we can do is . . . see the opportunities as they develop, force the vulnerabilities to be exposed to us, and then take the appropriate action at the appropriate time," Army Brig. Gen. Vincent K. Brooks told reporters at U.S. Central Command headquarters in Doha, Qatar.

The U.S. invasion force, built around one tank-heavy Army division and one lighter Marine division, is not large or powerful enough to take Baghdad by force, especially with tens of thousands of heavily armed fighters believed loyal to Hussein still inside the sprawling city. But it does have enough armored units to conduct reconnaissance missions. "You're going to see a lot of patience and finesse, instead of assault tactics, because there is no reason to do that," Leonhard said.

If resistance to those probing efforts is light, then the main attacking forces may go into the city, experts said, especially because of the political imperative to conclude the war as soon as possible. The longer the war goes on, U.S. officials believe, the greater the risk that U.S. standing among the Iraqi people and elsewhere in the Arab world will suffer even further.

"We need to get rid of this thing in some kind of decisive way," Lang said. "We have to get this over with. I can't imagine them just letting this fester."

Even a large-scale attack would not aim to take over the entire city, but would instead try to capture or destroy certain key targets vital to the government's control over the capital, defense experts said.

"They might . . . hop in and occupy some strategic points, make these guys feel surrounded," said retired Army Lt. Gen. Terry Scott, a former commander of Army Special Operations Command. "Mostly it's occupying places that retard their ability to move around from place to place -- it may be road intersections, it may be particular buildings, it may be sets of buildings."

On the other hand, if the population broadly opposes the U.S. presence, some experts said, the probable alternative would be to loosely cordon off Baghdad until more troops arrive. "We need a lot, a lot, a lot of light infantry," a Pentagon official said.

To do that, said retired Army Maj. Gen. Robert H. Scales Jr., the military would establish a perimeter that stops well short of a siege. The U.S. line, he said, would be "porous enough to allow the enemy who are willing to escape an opportunity to do that."

Then, he said, the hope would be "that the city will collapse upon itself."

Baghdad, he explained, "contains all the elements of insurrection -- rich and the poor, Sunni and Shiites, the regime and the families of those the regime has murdered. It's like a tinderbox inside the city, and what you need to do is supply the spark that would enable this internal collapse to occur."

In the meantime, said retired Air Force Lt. Gen. Thomas G. McInerney, the Army's 3rd Infantry Division, which has spearheaded the drive to Baghdad from Kuwait, could swing to the northwest around Baghdad to Hussein's hometown of Tikrit, with an eye on seizing control of the northern oil fields and the important oil hub of Kirkuk north of Tikrit.

Demonstrators in Najaf confront a 1st Brigade patrol trying to meet city's chief cleric.Baath Party members march in Baghdad last week to protest war. Military analysts are uncertain how the city's residents will react to approaching U.S. troops.