With President Obama’s announcement of total withdrawal from Iraq, Americans will again ponder the war that dominated the last decade, and which will preface what historians eventually write about America’s fate in the 21st century. The president’s epitaph Friday of a war he opposed, and would have had America lose, was hardly fitting.

In fact, America won the war in Iraq—twice.

In 2003, American arms, masterfully trained, equipped and commanded, destroyed Saddam Hussein’s army and regime with stunning speed and precision.

Later, an insurgency that at times resembled a civil war caused an appalling level of violence and terror in Iraq. Pent-up tensions in Iraqi society erupted into violence with the end of Saddam’s repression. Unwise U.S. political suzerainty, especially that of de facto viceroy Paul Bremmer, a member of the State Department’s foreign service, exacerbated the problems in Iraq.

Liberals counseled withdrawal. Most conservatives believed this would have led to another Vietnam-like defeat for the USA, with similar economic and security consequences. Then-President Bush decided instead to surge forces and implement a counterinsurgency strategy aimed at establishing security.

Mr. Obama, just after passing the second anniversary of his entry in the U.S. Senate, said, “I have been a consistent and strong opponent of this war.” He also assessed of the surge that “I cannot in good conscience support this escalation. It is a policy which has already been tried and a policy which has failed.”

The Democrats’ then and current leader in the Senate, Harry Reid, was even more direct once the surge was under way. He said, “this war is lost and the surge is not accomplishing anything.”

But history shows the surge worked. Our side won.

No other nation on earth could have accomplished this twin military feat. And few other nations have the political will—the collective guts—to have persevered as did the United States.

Furthermore, members of a new generation of Americans, previously viewed somewhat quizzically and labeled blandly as Generation X and Generation Y, rose voluntarily to a challenge all too often ridiculed and derided by those at the heights of their own culture, media and political class.

For the twin victories they won, and for the position and security they provided our nation, we should be grateful—and we should celebrate.

But celebration hardly seems to be the air. Friday’s announcement will be seen as a failure of diplomacy—and probably one that Mr. Obama accepted and perhaps even desired long before he threw in the towel. Our military commanders and members of Mr. Obama’s own cabinet wanted a continued U.S. military presence in Iraq. Threats in the region will only increase as the U.S. security presence declines.

Thus America’s presence in Iraq will end on a sour note. President George W. Bush saw to it that there was no Iraq equivalent to the fall of Saigon, with Americans and our allies fleeing before a victorious enemy. Now, President Obama has seen to it that there is nothing that warrants celebration, even though it is clearly warranted for our returning heroes, and those who served in Iraq before them.

Historians looking back will take a longer view. They will know whether the economic and political power America held entered sustained decline in the early part of this century, as many an analyst has concluded. Or whether the military and cultural mettle America displayed in Iraq revealed again a nation that would remain exceptional and pre-eminent.

Christian Whiton is a former U.S. State Department senior adviser and is a principal at DC International Advisory.