KABUL/BONN, 3 December — The UN outlined a draft agreement for Afghanistan’s future yesterday, saying a text submitted for approval by rival Afghan groups provided for a six-month interim government and a symbolic role for the former King Zahir Shah. UN spokesman Ahmad Fawzi said the draft accord also provided for a supreme court and a 21-member special independent commission to organize the convening of an emergency Loya Jirga — a traditional grand assembly of tribal elders. It will take at least another day to agree on who should do exactly what.

The dominant Northern Alliance, which now controls most of Afghanistan, and three exile factions have agreed to the outline of a power-sharing government, but are still haggling over its 25 to 30 members.

Billions of dollars in reconstruction aid rest on a deal, a carrot the United Nations and big donor countries are dangling as delegates scurry between bargaining sessions in a top-security hotel shrouded in mist on a hill outside Bonn.

Despite late-night debates and Ramadan fasting, the Afghans displayed an irrepressible optimism that they can clinch a deal very soon, without saying exactly when. Diplomats following the talks expect an agreement by today.

On the ground, US bombers pounded Kandahar and ethnic Pashtun fighters attacked the southern city’s airport. A tribal spokesman said they had met strong resistance from hundreds of Bin Laden’s Arab forces entrenched there.

“The Arabs are really fighting, they know they have no choice, they are fighting to the death,” Khalid Pashtoon, a spokesman for Gul Agha Sherzai, the former Mujahedeen governor of Kandahar, told Reuters by satellite phone.

A senior US Marine officer said at a desert airstrip in southern Afghanistan that he had expected the city to fall last week but the Taleban were still in control. “But you have a lot of forces at play. Opposition groups coming from the north down, from the southeast up, and us coming potentially from where we are,” Maj. James B. Higgins told reporters at the base, seized Nov. 25.

The Pakistan-based Afghan Islamic Press (AIP) said 13 civilians had died yesterday in airstrikes on Kandahar airport and the city’s southern outskirts. An official in the eastern city of Jalalabad said US airstrikes had killed about 20 civilians in the mountainous Tora Bora area where Bin Laden is reputed to have an underground hideout.

Separately, fifteen villagers, including nine children, were killed in a bombing raid on a hamlet in which US forces appeared to have mistaken an aging jeep for a military vehicle, the owner said. Muhammad Khan, who arrived in Chaman, Pakistan from Kandahar for hospital treatment to his wounded arms and legs, said that five of his children were killed when the hamlet was attacked Tuesday. All five houses which made up the hamlet between Kandahar airport and the city were demolished in the raid. A neighbor lost four children in the attack, Khan said.

More than 80 remaining Taleban prisoners who had been holed up in a prison fortress near the northern city of Mazar-e-Sharif were literally flushed out of their hiding and some were being treated in hospitals yesterday, an Afghan health official said.