Pundits these days are quick to compare the fighting in Iraq (search) with the American loss in Vietnam (search) 30 years ago. Terms like "quagmire" evoke the Southeast Asian jungle, where America's technological advantages were negated and committed Vietnamese guerrillas wore down the U.S. will to fight.

People love to draw historical analogies because they seem to offer a sort of analytical proof—after all, doesn't history repeat itself? In fact, such comparisons do have value, but like statistics, it's possible to find a historical analogy to suit any argument. And Vietnam's the wrong one for Iraq.

In fact, World War II is a far more accurate comparison for the global war we are waging to defeat terrorism. Both wars began for the United States with a catastrophic sneak attack from an undeclared enemy. We had many faint and not-so-faint warnings of the impending Japanese assault on Pearl Harbor (search), not least the historical precedent of Port Arthur in 1904, when the Japanese launched a preemptive strike against Russia.

We had similar ill-defined warnings and precedents about Al Qaeda (search) and Islamist terrorism (search) (the East Africa embassy bombings (search) in 1998; the USS Cole bombing (search) in 2000), but in 2001 as in 1941, we lacked the "hard" intelligence requisite to convince a country at peace that it was about to pitched into war.

Historical apologists say that the Japanese were "forced" to attack us because we were strangling their trade in Asia. Sound familiar? American foreign policy in the Middle East is responsible for the anger and rage that has stirred up Al Qaeda, right? In fact, there is a crucial similarity between the Japanese imperialism (search) of 50 years ago and Islamic fundamentalism of today: both are totalitarian, anti-Western ideologies that cannot be appeased.

As Japan amassed victory after victory in the early days of the war, America and our allies could see that we had a long, hard slog ahead of us. Americans understood there was no recourse but to win, despite the fearful cost. This was the first and foremost lesson of World War II that applies today: Wars of national survival are not quick, not cheap, and not bloodless.

In one of our first counteroffensives against the Japanese, U.S. troops landed on the island of Guadalcanal (search) in order to capture a key airfield. We surprised the Japanese with our speed and audacity, and with very little fighting seized the airfield. But the Japanese recovered from our initial success, and began a long, brutal campaign to force us off Guadalcanal and recapture it. The Japanese were very clever and absolutely committed to sacrificing everything for their beliefs. (Only three Japanese surrendered after six months of combat—a statistic that should put today's Islamic radicals to shame.) The United States suffered 6,000 casualties during the six-month Guadalcanal campaign; Japan, 24,000. It was a very expensive airfield.

Which brings us to the next lesson of World War II: Totalitarian enemies have to be bludgeoned into submission, and the populations that support them have to be convinced they can't win. This is a bloody and difficult business. In the Pacific theater, we eventually learned our enemies' tactics—jungle and amphibious warfare (search), carrier task forces, air power—and far surpassed them. But that victory took four years and cost many hundreds of thousands of casualties.

Iraq isn't Vietnam, it's Guadalcanal—one campaign of many in a global war to defeat the terrorists and their sponsors. Like the United States in the Pacific in 1943, we are in a war of national survival that will be long, hard, and fraught with casualties. We lost the first battle of that war on Sept. 11, 2001, and we cannot now afford to walk away from the critical battle we are fighting in Iraq any more than we could afford to walk away from Guadalcanal.

For the security of America, we have no recourse but to win.

Lieutenant Colonel Powl Smith, U.S. Army, is the former chief of counterterrorism plans at U.S. European Command and is currently in Baghdad with Multi-National Forces-Iraq.