Thursday marked the end of Afghan President Hamid Karzai’s unprecedented four-day visit to Washington, D.C. President Barack Obama rolled out the red carpet for Karzai and his entourage, and Vice President Joe Biden, who in the past has erupted in open hostility toward Karzai, even held a “kiss and make up” dinner to smooth over the stormy relationship.

All of this hoopla is the belated recognition by the Obama administration that although Karzai is weak and corrupt, he is the only game in town in Afghanistan. Of course, if the Vietnam War is any indication, being chained to a local leader with no legitimacy at home is usually the death knell of a war effort. The United States gave tacit approval for the overthrow of South Vietnam’s leader, Ngo Dinh Diem, in 1963 (even before the U.S. escalated its involvement), and many historians consider his corrupt successors to have been the major cause of losing the war.

President Lyndon B. Johnson has been criticized for not letting the U.S. military do everything necessary to win in Vietnam, but LBJ was trying to avoid an all-out war with a large communist power and never intended to win. He was merely trying to force the North Vietnamese and Viet Cong into a negotiated settlement. The zealous communists, however, never intended to compromise.

Obama is trying the same gambit in Afghanistan. One major problem with this strategy is that Obama has indicated his intention to begin withdrawing forces in the summer of next year. The Taliban has every incentive to merely hang on and outwait Obama.

Even more problematic is the fact that the hated U.S. presence in Afghanistan and the U.S. drone strikes against the Pakistani Taliban have destabilized Pakistan and made real the possibility that Islamist militants could eventually take over the nuclear-armed Pakistani government.

Perhaps equally bad, the Pakistani Taliban, which had previously confined its efforts to destabilizing the Pakistani government, is now assisting attempted terrorist attacks in the United States. As in Yemen and Somalia, the United States has made new Islamist enemies of groups that used to concern themselves primarily with local issues.

President Obama, like his predecessor George W. Bush, has dismissed the obvious link between aggressive U.S. foreign policy in the Middle East and increased terrorism against U.S. targets. This is in spite of Osama bin Laden’s repeated declarations that his primary reason for attacking before, on, and since 9/11 has been U.S. military intervention in Islamic countries.

White House counterterrorism adviser John O. Brennan calls the drone attacks in Pakistan a “success” because the Pakistani Taliban is now “relegated to trying to do these unsophisticated attacks.” Brennan fails to realize that the terrorist attacks wouldn’t be occurring at all, but for U.S. intervention in Islamic lands.

The original purpose of the war in Afghanistan was to eradicate al-Qaida’s base of operations there. Al-Qaida is now probably instead in Pakistan. The U.S. government’s inability to distinguish between al-Qaeda, with its global ambitions, and the Afghan and Pakistani Taliban, with their local goals, has created new enemies while failing to eradicate ones that attacked the U.S. How are Americans being made safer by this war?