Producer/director Havana Marking on filming a doc about Afghanistan's answer to Pop Idol.

Ever since I was a child, Afghanistan has always sounded extraordinary, beautiful and bizarre: I was desperate to go. For years I had been trying to find a commissionable idea that would get me there. Then I found out about Afghan Star, a local take on Pop Idol, airing on a new independent channel, Tolo TV, based in Kabul.

The first series had been small but successful and thousands of young people were set to audition for the second, including three brave women. The concept was weird: under the Taliban music and TV were banned, women were forbidden to go out alone or uncovered, and voting for anyone - let alone your favourite pop star by text - was a radical idea.

But no other TV format is more familiar to western audiences. I wanted to know what Afghanistan, with its fledgling democracy, would make of it.

Wonderfully, Mike Lerner and Martin Herring at Roast Beef Productions agreed to co-produce a film about Afghan Star. We met the owners of Tolo TV, the Mohsenis, in London. We loved their fuck-off-if-you-don't-like-it attitude and admired what they had achieved. We negotiated full access and a local production team, in return for a 50:50 split on rights. They had no editorial control, but would watch the final cut and ensure no one's life was endangered by it. In return, I would train some of their staff in Kabul.

Last November we went to the C4 Britdoc Film Foundation. The Afghan Star series was about to start and, mad visionaries that they are, they gave us development cash.

During my first week filming in Kabul there were three suicide bombs. But in among the barriers and checkpoints was the paradise that was Tolo TV: young men and women in funky clothes working on programmes they believed in. They were confident they could make a difference and their passion was infectious.

I found the key characters to film and the right staff. I had a driver, a translator and a bodyguard. My bodyguard was a champion wrestler who was calm, kind and able to diffuse trouble with a few words. My driver was skilled on the dangerous roads and at checkpoints. He had been jailed by the Taliban for playing music and was my main source for the soundtrack.

As a woman in a strict Islamic country it was vital to maintain respectability. I found the perfect translator/chaperone: he was camp, a huge gossip and when things became stressful we could retreat into calming chat about hairstyles.

I returned to the UK with a taster tape and a shopping list. More 4 commissioned the film for its True Stories strand, C4i Distribution gave us an advance and I stocked up. It was about to get very cold indeed (-26 degrees C) and I needed thermals and a never-ending supply of headscarves.

My cameraman, Phil Stebbing, came with me to Kabul a few weeks later. He has a great eye and instinctively followed action even if we didn't know what the hell was going on. Better still, after a trip to the local barber Phil looked completely Afghan: often no one would notice him.

My editor Ash Jenkins also came to Kabul. We shot on HDV with Z1s but rushes can easily be confiscated: Tolo is hated by many in the government. We kept the tapes at Tolo but digitised onto hard drives, which were kept elsewhere.

As Afghan Star reached the final 10, we started filming in earnest. Two women had made it, including Lima Sahar from Kandahar, a Taliban stronghold. The burqa she wore around her home town helped protect her identity.

The studio was built in an old wedding hall, with lights and a crane from Dubai. Considering the lack of electricity and terrifyingly dodgy wiring, the producers created something stunning.

It became clear one particular star, Setara, was going to be the most interesting candidate and the most open on camera. In her final performance she let her scarf fall and danced - an unprecedented event. Even men don't dance in public. The traditionalists reacted and she had to go into hiding. Death threats are no laughing matter.

Afghanistan is a hospitable and wonderful country but there is a lot of etiquette. The details of where to sit, how to sit and, as a woman, how to obtain the respect needed to direct are crucial. Sometimes you can use it to your advantage of course: when we interviewed the old chap in charge of the Islamic Council he was incensed to have a woman, a camp guy and an old hippy (Phil) in his room. He gave a wonderfully angry interview.

Afghan Star is a Roast Beef Productions, Redstart Media and Aria Productions co-production.

It debuts at Sheffield Doc/Fest on 8 and 9 November and will air on More 4 in the new year

Havana Marking: My tricks of the trade

Crew lunch. Never have a late lunch. There is nothing worse than a hungry bodyguard.

Charge batteries as and when you can. Electricity is scarce [in Afghanistan]. Don't assume you can do it overnight.

Slip-on boots. You need sturdy boots but you also need to remove them on entering any house. Laces are a nightmare at -26°C.

As a woman it is very important to be respectable: never flirt, drink or smoke in public. No one should fart. Ever.

Find a good beauty parlour. Afghanistan has a very macho culture: having your nails or hair done is a vital relief. It also hard-wires you into local gossip.