Kabul (AFP) -
Haji Mirzaman was just a teenager when he started taking photos using a homemade wooden box camera in his cousin's studio in downtown Kabul.
He took black-and-white portraits of people for passports, identity cards and other documents using his 'magic box' on a sidewalk, producing prints in a couple of minutes.
Now in his 70s, he says the instant camera -- or 'kamra-e-faoree' as it is known in Dari -- has survived wars, invasions and a Taliban ban on photography, but is now in danger of disappearing because of digital technology.
'These cameras are retired now,' he told AFP at his small house in Kabul as he set up the box on its wooden tripod.
'I am just keeping this last remaining camera.'
The box is both camera and darkroom, and to show how it works Mirzaman put photographic paper and developing liquid inside the device in preparation for a shot.
He then briefly removed the lens cover and instantly created a negative.
Reaching inside the box through a light-proof funnel, he processed the negative and then developed a print.
In a few minutes, the photo was ready.
'Nowadays, photographers all use digital cameras... fewer and fewer people know how this camera works,' he said.
- Golden age -
The boxes were made by local carpenters, he said, but the lenses were imported.
The golden age of box cameras in Afghanistan came when compulsory national service was introduced in the 1950s, meaning thousands of recruits needed photos for military identity cards.
The Taliban, who ruled Afghanistan from 1996 to 2001 and forbade images of people, allowed Mirzaman to take official photos with his box camera.
After the group's ouster, the machines thrived again when millions of students returned to schools and ID cards were made compulsory.
Since their return to power in August, the hardline Islamists have made no public declaration on taking pictures -- and young fighters are frequently seen snapping photos of each other, or selfies, with their mobile phones.
Mirzaman has taught all four of his sons photography, but none now uses box cameras.
The family's last remaining kamra-e-faoree is now on display outside their studio -- a striking reminder of Afghanistan's photographic history.