Since the day in May 2003 when President Bush stood beneath a banner proclaiming "Mission Accomplished," the course of the conflict in Iraq has been one of optimism followed by revision.
From the earliest battle plans, which called for the quick return home of tens of thousands of troops, to the campaign in Fallujah and national elections that followed, the Pentagon had hoped it could largely eliminate lingering unrest before turning security over to Iraqis.
The increasingly bracing tone from the White House and Pentagon, however, points to a new calculus. The persistence of the attacks, as well as their undiminished capacity - witnessed by Wednesday's bombings in Baghdad, which killed more than 150 Iraqis - seems to have confirmed that the insurgency will probably outlast the American occupation.
Indeed, the inability of American forces to defeat the insurgency through strikes such as the current offensive in Tal Afar raises doubts about the possibility of any clear victory for the administration. And it could leave the Iraqis with a years-long task that many planners had not anticipated.
"There has been a clear realization that this war is not winnable in the short term," says Seth Jones, a terrorism expert at RAND Corp. in Arlington, Va.
The change in thinking has come gradually, as pivotal moments in the maturation of the Iraqi state have come and gone - and the insurgency has remained. In the first months after Mr. Bush declared victory, Pentagon officials were loath even to use the word "insurgency" to describe the attacks that killed some two dozen troops in May and June of 2003.
In testimony before Congress that July, Gen. Tommy Franks argued that the attacks did not fit his definition of an insurgency.
A year later, however, the continuing toll of the insurgency was reshaping the Pentagon's expectations. By the spring of 2005, a spike in violence, despite the previous November's successful campaign against the insurgent stronghold of Fallujah and January's relatively peaceful elections, made it clear that political momentum was not enough.
Part of the reason for the failure to plan for uncertainties came from the ideological insistence that almost all Iraqis would see Americans as liberators. Yet it also came from a political calculation that dismissed the lessons of the Clinton years. "There was a sense that there was nothing to learn from Somalia or Haiti or Bosnia," says Dr. Jones.
Some parts of the administration have been slower to reach this point than others. In the midst of the May attacks, Vice President Dick Cheney famously said that the insurgency was in its "last throes." But less than a month later, on June 26, Defense Secretary Donald Rumsfeld said: "Insurgencies tend to go on five, six, eight, 10, 12 years. Coalition forces, foreign forces are not going to repress that insurgency. We're going to create an environment that the Iraqi people and the Iraqi security forces can win against that insurgency."
It is this attitude that has moved from post-invasion rhetoric to Pentagon doctrine. In some ways, it is the same measure of victory that the Pentagon laid out two years ago. "At an absolute minimum, we'll be here for [two years], and probably longer, to make sure that [Iraqi forces] are capable of protecting the sovereignty of Iraq," said Lt. Gen. Ricardo Sanchez in an Aug. 7, 2003, Pentagon briefing.
Administration officials have always insisted that events on the ground - and not artificial timelines - would dictate American actions in Iraq. Yet today, the finish line is no more certain than it was two years ago - and the threat that Iraqi forces will be facing when US troops leave is more dire than many military officials imagined.
The result is that Bush's characteristic steel about Iraq still lacks any specifics or certainty. "As a practical matter, no one in the administration is going to admit this," says Anthony Cordesman, an analyst for the Center for Strategic and International Studies here. "Nobody's making military promises that are unrealistic."
There are some positive signs. The offensive to roust insurgents from Tal Afar, which began in May and intensified the past two weeks, has put more responsibility in the hands of the Iraqi military. "It's a very important step in turning over security to the Iraqis," says Rachel Bronson, an analyst for the Council on Foreign Relations in New York.
But there is a long way to go, she and others say. Significantly, when Iraqi President Jalal Talabani suggested this week that Iraqi forces would be ready to replace 50,000 US troops by the end of the year, he quickly reversed his statement and later added that US soldiers might be needed for another two years, though he set no deadline.
Amid this military uncertainty, administration officials have turned to political events as the primary marks of progress. "The referendum on the constitution and the elections at the end of December are the most important aspects of what we're doing now," Gen. George Casey told Congress in June.
Yet Wednesday's attacks in Baghdad suggest that the practical matter of adequately preparing the Iraqi military - not the grand clash of political ideas - will ultimately determine the success or failure of American hopes, analysts say. In a recent paper, Dr. Cordesman writes: "If political developments do have a positive effect, it will be ... because a substantially larger number of Iraqi Sunnis ... see the military balance shifting decisively in favor of Iraqi government forces."