In April 1992, three years after the Russians withdrew from Afghanistan, Ahmed Shah Masood, who died on September 15th aged 48, climbed into a dark green Soviet jeep at Bagram Airport and led a column of tanks down the road to Kabul.
Three hours later, after a brief stop to pray on the empty road, he entered the capital. Not a shot was fired, although there was heavy fighting immediately before between Masood's coalition force, and the troops of Gulbuddin Hekmatyar and the communist interior minister, who were also trying to take the city.
Ahmed Shah Masood's victory, the result of three years' planning, and the speed of his reaction to the collapse of the Najibullah regime, deserted at the end by its Soviet sponsors, stunned everyone. In particular, ISI, the Pakistan army's intelligence arm, which had supported the Pashtun Hekmatyar throughout the war, and virtually ignored him in terms of money and arms, were angry. After all their careful planning, the final prize of the Afghan war had eluded them.
The son of a colonel in King Zaher Shah's army, Ahmed Shah Masood always wanted to be a soldier. As a boy, according to his father, he played war games with his friends.
After primary school in Herat, he attended the French-run Istiqlal lycΘe in Kabul. Instead of joining the army, however, he studied engineering at Kabul Polytechnic, where Hekmatyar was also a student.
In 1975, Hekmatyar, an Islamic firebrand, was involved in a coup against President Daoud, who two years earlier had deposed the king, his cousin. With Daoud's pro-Moscow policies becoming increasingly unpopular, Hekmatyar asked Ahmed Shah Masood to organise a rebellion in his home valley, the Panjsher, 100 miles northeast of Kabul.
He at first declined, but finally agreed, according to one of his brothers, when Hekmatyar taunted him with being a coward. Although the coup succeeded in the Panjsher, it failed nationally, and along with Hekmatyar he fled to Pakistan.
There he received guerrilla warfare training from ISI, and read, amongst others, Mao Zedong and Che Guevara.
In June 1979, he slipped across the border to begin his resistance, at first against the Afghan communists, and later against the Soviets, after their invasion the following December.
He had with him only 27 companions, armed with a collection of weapons ranging from two Kalashnikovs and two RPG7s with seven rockets, to five shotguns and nine old-fashioned British .303s.
In one abortive operation, he was wounded in the leg and suddenly realised, as he said later, that "training, training, training" was the key to success.
By summer 1982 he had survived six major Russian offensives.
Four years later, he had expanded his operations to the north, capturing a key government fort in Takhar province, and later taking the provincial capital, Taloqan.
Ahmed Shah Masood and his allies now controlled virtually the whole of northeast Afghanistan and, by early 1992, when one of Najibullah's northern commanders, General Momen, and the feared Uzbek general, Abdul Rashid Dostum, defected, he knew victory was near.
It came, in fact, with the speed of an avalanche, sweeping him to the post of defence minister in the new mujahideen government, of which Professor Rabbani, the head of Jamiat-i-Islami, was president. But soon things turned sour.
Three months later, Hekmatyar, supported by the ISI, mounted a savage rocket attack on Kabul. One eyewitness counted 600 rockets "before breakfast".
On new year's day 1993, Ahmed Shah Masood and the government came under ferocious attack from Hekmatyar, his erstwhile ally Dostum, and the Shias. Against all the odds, they survived, but the destruction unleashed on Kabul was horrific.
In 1994, the Taliban appeared. At first he welcomed them but as their ruthless tactics and appetite for power became clear, he changed his mind.
In 1995, they took Herat and soon laid siege to Kabul.
By summer 1996, he knew he had no option but to withdraw. It was a fighting retreat, followed by a brilliant series of counter-attacks. But, inexorably, he was driven ever deeper into a corner.
His assassination is a tragic loss for his country. Modern-minded, pragmatic, sensible and moderate, he had much still to offer.
He will be remembered mainly for his military resistance against the Soviet Union, but he was also a civilised man in the best Afghan tradition, with a love of poetry.
When he left Kabul for the last time in 1996, he took with him a library of 2,000 books.
He is survived by his wife, Sadiqa, one son and four daughters.
Ahmed Shah Masood: born c1952; died, September 2001