When you study how the U.S. goes to war, there is a prevalent though not perfect pattern. The triggering event is often a sudden crisis that galvanizes popular opinion and becomes the immediate occasion for military intervention but subsequently is exposed as a misguided perception or outright fabrication.

The Mexican War began when President James K. Polk cited an attack on American troops in Texas — troops he had deliberately placed there to provoke Mexico. The Spanish-American War began when President William McKinley claimed the battleship Maine had been blown up by Spanish saboteurs. Investigations showed the explosion originated inside the ship, probably due to an accidental fire in the munitions compartment.

The Vietnam War moved into high gear when President Lyndon B. Johnson used an incident in the Gulf of Tonkin to justify massive military intervention in Southeast Asia.

This pattern is not perfect. The Japanese attack on Pearl Harbor was not a figment of President Franklin D. Roosevelt's imagination. Nor have subsequent conspiracy theories arguing that he was willfully negligent, searching for a "back door to war" against Germany, stood the test of time.

American military intervention in Iraq, however, fits the pattern perfectly. As we watch the enormous U.S. investment in blood and treasure over the last 11 years dissolve in Iraq, history requires that we remember the reasons we went to war.

But the dark shadow of 9/11 hung ominously over all deliberations in that moment, so the CIA bent the arc of the evidence to fit the fabrication, a cowed Congress went along and the bulk of the American media endorsed the deception. Dissent became unfashionable.

When the facts became clear and the justification for our military intervention evaporated, a new rationale needed to be invented. We were, it turned out, committed to the creation of a democratic government in the middle of the Middle East.

As recent events in Iraq have clearly demonstrated, this democratic dream was always an illusion. And all those political and journalistic pundits who got it dead wrong the first time around, and who now blame President Barack Obama for failing to maintain a residual U.S. military presence in Iraq, need to be called on their credibility. For they fundamentally underestimated the tribal, ethnic and religious loyalties that dominate the Middle East and that make any Jeffersonian version of a secular state in Iraq impossible for the foreseeable future.

What we are witnessing now is the partitioning of Iraq into three regional sovereignties which was always the inevitable consequence of our toppling of Hussein.

Commentators focus on what military or political actions the United States should take to control the damage, thereby exposing the same assumptions that led us into this morass. The sectarian forces raging in Iraq and much of the Middle East are beyond our control. Any permanent U.S. military presence will only further empower the Islamic extremists in the conflict.

Our big mistake was not failing to leave a residual force in Iraq in 2011 but invading the country in 2003. The gargantuan embassy we constructed in Baghdad is destined, sooner rather than later, to become a relic that symbolizes American folly. Start replaying those old tapes of helicopters landing on the roof of the U.S. Embassy in Saigon in 1975.

The recent decision to send 300 American troops back into Iraq reveals that even Obama does not get it. He believes that the United States can overcome more than 1,000 years of history to transform the Middle East. We can't, and we never could.

And if some horrific incident befalls one of our ships in the Persian Gulf, or if catastrophe strikes our so-called military advisers, prompting calls for more American troops, my advice to all reporters is to double-check history, and your sources.

Joseph J. Ellis is a professor of history at Williams College. He is the Pulitzer Prize-winning author of "Founding Brothers: The Revolutionary Generation." He wrote this for the L.A.Times.