Updated

Three U.S. special forces soldiers were killed and 20 others hurt in Afghanistan Wednesday when a B-52 bomber accidentally dropped a bomb near them, the Pentagon confirmed. Two of the Americans were killed on the scene; the third died on the way to the hospital.

The Pentagon identified those killed as Master Sgt. Jefferson Donald Davis, 39, of Watauga, Tenn.; Sgt. 1st Class Daniel Petithory, 32, of Cheshire, Mass.; and Staff Sgt. Brian Cody Prosser, 28, of California.

All were members of the Army's 3rd Battalion, 5th Special Forces Group, stationed at Fort Campbell, Ky.

Five anti-Taliban fighters accompanying the Americans also died in the incident, Pentagon spokeswoman Victoria Clarke said. The "friendly fire" bombing took place north of Kandahar, the Taliban's birthplace and last redoubt.

The weapon was believed to be a 2,000-pound satellite-guided bomb called a JDAM, or Joint Direct Attack Munition, said Clarke. She said she didn't know the intended target.

"I, along with all the rest of America, grieve for the loss of life in Afghanistan. Three of our soldiers were killed by an inadvertent bomb, and our prayers and sympathies go to the families," President Bush said before meeting in the Oval Office with Norway's prime minister, Kjell Magne Bondevik.

"I want the families to know that they died for a noble and just cause, that the fight against terror is noble and it's just, and they defend freedom," Bush said. "And for that, we're grateful."

"These men died as heroes and were wounded as heroes," said Rear Adm. John Stufflebeem, deputy director of operations for the Joint Chiefs of Staff, at the Pentagon.

The bombing happened at about 10 a.m. Afghan time — 12:30 a.m. EST — as the B-52 targeting Taliban positions missed a target and dropped a bomb "in close proximity to friendly forces," said Lapan.

Stufflebeem said Marines based south of Kandahar rushed to the scene and evacuated the casualties. A combat search-and-rescue team based in Pakistan also responded, he said.

Some casualties were evacuated to the Marine base in southern Afghanistan for transfer to another, undisclosed, medical facility, while others went directly to the facility, said Capt. Stewart Upton, a public affairs officer at the base. About 20 Afghan troops were treated at the Marines' base, he said.

The Pentagon provided few details about the circumstances of the accident. It was not clear whether the bomb's guidance system malfunctioned or human error was responsible.

"We're still trying to get information about what happened," Clarke said.

Stufflebeem said the U.S. soldiers killed and wounded had called in the B-52 strike as Afghan opposition forces were fighting Taliban troops. He said the bomb landed about 100 yards from the U.S. troops, but he was not certain the exact location of the intended target. To be safe, a person should be at least 1,300 yards away from the explosion of a bomb that size, he said.

"A 2,000-pound weapon is a devastating weapon," he said.

Some of the American casualties included special operations soldiers from Fort Campbell, Ky., home of the 5th Special Forces Group, said a spokesman at Fort Bragg, N.C., headquarters for all Army special forces.

The names of the killed and wounded were being withheld pending notification of their families.

American deaths in Afghanistan now number four. CIA operative Johnny "Mike" Spann was killed Nov. 25 at the beginning of the Qalai Janghi fortress prisoner revolt. Five U.S. soldiers were hurt by another U.S. JDAM bomb during that uprising.

Another U.S. soldier was shot under the collarbone in fighting near Kandahar Tuesday, but his injuries were not life-threatening, anonymous defense officials said.

The soldier, who had been working with anti-Taliban groups, was evacuated from Afghanistan and was in stable condition at a military hospital, a U.S. Central Command statement said.

Four other servicemen have died in accidents outside Afghanistan during operations related to the war on terrorism — two in Pakistan in a helicopter crash, one accidentally shot in Uzbekistan and another run over by a truck while loading equipment.

Defense Secretary Donald H. Rumsfeld has pointed out in recent days that the United States has entered a more dangerous phase in the war to root out the Taliban, Usama bin Laden and his Al Qaeda terrorist network.

"It is a very complicated, untidy circumstance, and it makes it a dangerous and difficult task," Rumsfeld said Tuesday at a Pentagon press conference.

"The situation in Kandahar is complicated," he added. "It's not easy, but one thing is clear: The Taliban and Al Qaeda will be driven from Kandahar."

Rumsfeld said Marines would probably not be involved in the assault on Kandahar, but patrols operating out of the base 70 miles southwest of the city were preventing Taliban forces from moving.

The base, a former private airfield for rich Arabs to use on hunting trips, is temporary home for some 1,300 U.S. Marines and an unknown number of British and Australian troops.

American troops have been on the ground in Afghanistan for weeks to help forces fighting the Taliban militia, giving them weapons, food and other supplies. They also have been helping call in airstrikes, pinpointing targets for U.S. warplanes.

American planes have been bombing Kandahar to help anti-Taliban attackers, while Taliban leader Mullah Mohammed Omar has instructed his followers not to surrender.

Two main groups of anti-Taliban forces are pressing toward Kandahar as the Marine base's contingent of about 1,300 operates within striking distance. The opposition forces included those of Hamid Karzai, who was named head of the provisional government in Afghanistan Wednesday morning. Karzai told Britain's Channel 4 News that he was safe.

The United States is focusing its bombing on Kandahar and the mountainous area near the Khyber Pass south of Jalalabad, where it is believed bin Laden and his top lieutenants are hiding in a complex of caves and tunnels.

The Associated Press contributed to this report.