The Soviets were beating the crap out of the Afghans until the US and Pakistan decided to give them rear bases, Stingers and assorted weaponry to neutralize the Soviet air advantage and provide shelters beyond the military reach of the Soviets.
And yes, the Mongols made mashed potatoes of Afghanistan. The Mongols were so successful at devastating the place that, even today, many of this region's pathologies are consequences of the 1219-1221 campaign.
The US is losing the war in Afghanistan because they're not fighting the war in the first place. They are too busy in Iraq.
They had already crushed the greatest army in Europe, the Hungarian, and I have no doubt that they they would have crunched the only remaining strong army, the French, like insects.
Before they invaded Russia (from the east and in winter no less! (the Mongols always fought in winter if they could)) they hade made this immense plan of conquering all of Europe, from the Urals to the Atlantic. It was supposed to take 12 years IIRC.
Oh well. They were so great at war than many of their methods and theories weren't rediscovered until WW2 by the Germans and pre-purge Russians. Peak oil is not an energy crisis. It is a liquid fuel crisis.