WASHINGTON – Heroic U.S. Special Forces commandos yesterday wiped out a three-man hit team that narrowly missed assassinating Afghan President Hamid Karzai.

Wearing vests and Afghan headdresses, the bearded, heavily armed Special Forces squad members jumped out of a jeep and killed the three gunmen – including one wearing an Afghan army uniform – in a dramatic gun battle just moments after the would-be assassins fired four shots into Karzai’s car in Kandahar.

U.S. and Afghan officials said preliminary intelligence indicated that the planned hit was part of a coordinated attack by elements of Osama bin Laden’s al Qaeda network against the U.S.-backed Afghan government, just days from the anniversary of the Sept. 11 atrocities.

Hours earlier, a huge car bombing killed a reported 26 people and injured scores more in a crowded market in Kabul, an attack also believed to be part of the al Qaeda operation.

Karzai, who was not hurt, was in his hometown to attend the wedding of his brother and was leaving the house of Kandahar’s governor, Gul Agha Sherzai, just before the attackers struck.

He was in a car and paused to greet a crowd of people who had come to welcome him.

Witnesses said a boy approached Karzai, and the Afghan leader leaned out from his window to exchange greetings with him when a gunman, dressed in an Afghan army uniform, opened fire.

At least four shots riddled Karzai’s vehicle. One whizzed past his ear and grazed Sherzai’s neck, according to accounts provided by Afghan and Pentagon officials.

The United States had assigned about 20 members of the elite Special Forces to join with Karzai’s Northern Alliance bodyguards after the discovery of another assassination plot by Karzai’s former security guards in July.

The commandos were in a jeep behind Karzai’s car when the first shots were fired. They immediately jumped out with guns blazing and killed the three would-be assassins before whisking Karzai to safety in the governor’s mansion.

The attackers’ bloody bodies lay in the streets afterward.

One Special Forces soldier was slightly injured during the gun battle, the Pentagon said.