Soviet troops invaded Afghanistan on 24 December 1979, launching a war which lasted a decade. The BBC has spoken to people on both sides about a conflict which marked their lives.
English writer and photographer Jason Elliot went to Afghanistan in the 1980s at the age of 19 to live with the Afghan resistance, or mujahideen.
Here he looks back on the chaos of combat and reflects on how a patriotic cause became embroiled in foreign ideology.
Jason Elliot was 19 when he first went to Afghanistan
I had arrived at a mujahideen headquarters at a tiny little ravine on our route towards Kabul from the Pakistani border.
One of the men had been injured after stepping on a landmine. The commander gave me a shawl the injured man had been wearing and told me I could wash it. It was soaked in his blood but I just saw a dirty shawl. I put it in the river, pushed the fabric down and saw the water turn red.
It was a defining moment - I realised this was the blood of a real man and he was dying at that moment on the donkey at the end of the path.
All talk of front lines, of decisive battles, trenches and advances, of supply columns and medical aid was nonsense. Sometimes battles erupted for no apparent reason.
There would be blissful days of peace and tranquillity and suddenly a missile landed in the village and people you were close to got killed. There was a randomness, a terrifying capriciousness to the conflict.
For most mujahideen groups, the war was a very local affair. They were content with attacking local Soviet and Afghan military positions and then going home.
The local military post would often launch attacks just to intimidate and harass the local population
The group I was with would go out at night to go and shoot up a military encampment full of mostly Afghan troops, not Soviets.
We would come back, then join another local group and shoot up one where the Soviets were.
The strategic value of these operations was limited but, equally, it seemed the same randomness was exercised at the other end.
The local military post would often launch attacks just to intimidate and harass the local population.
At night, I would feel a strange sense of longing as I looked to the hills over Kabul and saw this ragged line of peaks lit up every few seconds by bombardment.
The extremes of danger are very close to extremes of hilarity. I remember once our group was attacked as we were walking back from an operation on a moonlit night.
Suddenly the world exploded with machine-gun fire. The trees above our heads were being torn apart. I had never experienced gunfire before and didn't know how to react. It was more like witnessing a dream.
An Afghan friend dragged me to where the others had huddled as the bullets smacked off these rocks. There were all shaking, but not with terror - they were in fits of laughter. They were giggling, clutching their stomachs in paroxysms of laughter at the hilarity of being shot at. Later, I started laughing, too.
You began to see Arab fighters in Afghanistan in the mid-1980s.
Unlike the Afghans, who were defending their homeland, the Arabs' motives for fighting were more political than personal. Their arrival marked the point where the war began to lose its innocence.
The Arab fighters I met lacked the hospitality, civility, gentleness and tremendous light-heartedness of the Afghans.
Some Afghan mujahideen groups wanted nothing to do with them. Others accepted them. Others were obliged to accept them because they, of course, could provide resources.
Interviewed by Neil Arun, BBC News.