WASHINGTON - Even before the November election, President Bush and his national security adviser, Stephen J. Hadley, were informally discussing what Hadley was calling "the big push" - whether it made sense to increase the U.S. force in Baghdad to take back the city.

But when Hadley traveled to Iraq in late October, the commander there, Gen. George C. Casey Jr., warned that sending more U.S. troops to Iraq could be counterproductive, because it would make the Iraqi government less likely to defend itself. By the time Bush met with Prime Minister Nouri al-Maliki on Nov. 30, Maliki was insisting upon taking control over all Iraqi troops and urging the Americans to pull to the outskirts of his troubled capital.

During the last two months those diametrically opposed options - adding U.S. troops, or pulling back to let the Iraqi factions fight it out among themselves - marked the boundaries of a vigorous debate inside the administration. At one point, as Bush, Hadley, Secretary of State Condoleezza Rice and newly appointed Defense Secretary Robert Gates weighed their options, the president asked his deputies, in effect: "Why can't we just pull out of Baghdad and let the factions fight it out themselves?"

In the end, the president and his advisers crossed off all other options and came back to the idea of a U.S. troop increase - the new approach they concluded was the best of a series of difficult choices, according to a senior administration official involved in the process.

A narrative pieced together from interviews with participants and from public testimony suggests that through much of the process, generals who had been on the ground in Iraq for the last year had favored starting the operation with a substantially smaller force than the one Bush announced to the nation Wednesday night. In the end, it was Bush who appeared to drive his commanders along to the conclusion that more troops were needed.

In an appearance before Congress yesterday, Gen. Peter Pace, the chairman of the Joint Chiefs of Staff, confirmed that Casey had requested only two new U.S. brigades, about 9,000 troops, for Baghdad, along with three Iraqi brigades. The White House gave him five brigades. Gen. John P. Abizaid, who heads the Central Command, opposed any increase in U.S. troop levels until mid-November, when he became persuaded that the economic commitments by Iraq and the United States made it worth adding troops.

White House officials were clearly sensitive yesterday about any suggestions that the president countermanded his generals. They said the generals sought assurances that the Iraqis would undertake political initiatives and end the practice of freeing militiamen who were friends of the government and captured by U.S. or Iraqi forces.

The arc of Bush's approach to Iraq as it has played out in recent months is nevertheless striking. In public comments before the elections, Bush was still insisting that "absolutely, we're winning," and he resisted calls for troop increases.

Well before the election, Bush had decided to oust Secretary of Defense Donald H. Rumsfeld, the man who had come to personify the minimal-force strategy. Several officials said Rumsfeld's departure Nov. 8 helped to empower Hadley, along with his deputy at the National Security Council, Jack D. Crouch, to press for a study of a major troop increase. Those two men ran the review process inside the White House, and both said along the way that they considered many options. But Hadley was clearly focused on troop levels early on, suggesting in a Nov. 8 memorandum that the president should ask the Pentagon and Casey to recommend whether more forces were needed in Baghdad.

One senior official involved in the discussions said that Bush's instinct toward the start of the review process - and that of others - was to consider a withdrawal from Baghdad, allow Iraqi-vs.-Iraqi fighting to settle itself, and dedicate U.S. forces to focus on pursuing al-Qaeda fighters.

"As you peel that back and look at it, it just doesn't war-game out for you," said the official. "You're supposed to go flying through Baghdad looking for al-Qaeda and when you see ethnic cleansing going on look the other way?"

In the end, the official said, Hadley's teams concluded that U.S. withdrawal from Baghdad would "crater the government."