The risk of kidnapping while filming Jirga, a drama about a former Australian soldier who returns to Afghanistan to make amends to the family of a civilian he accidentally killed during a raid three years earlier, was real. The day before Smith and director Benjamin Gilmour arrived in Jalalabad, Australian aid worker Kerry Wilson had been abducted by gunmen and spent four months as a hostage. Not long before, a suicide bombing at a bank killed 33. The story about shooting Jirga is as dramatic as anything that will be on screen at the Sydney Film Festival next month. During two months the filmmakers spent in Afghanistan in mid-2016 - taking advice to stay inside when the so-called fighting season made conditions too dangerous - Gilmour and Smith shot for roughly 20 days. While they were in the city, one of their Afghani actors carried a handgun as security. When word spread that Gilmour wanted to shoot in the mountains, the Afghan police and army escorted them for a price.

One day, the duo abandoned shooting more scenes in a cave near Tora Bora after learning one of the local militant groups had planted an improvised explosive device overnight. Another time, Gilmour had to scatter when he noticed a military drone hovering five metres overhead. "There are numerous Taliban groups operating in Afghanistan," he says. 'There are criminal groups that are masquerading as Taliban who are behind a lot of kidnappings for ransom. And there is ISIS. We were mainly worried about ISIS." "We were mainly worried about ISIS": Sam Smith, right. Credit:Benjamin Gilmour Gilmour is a thoughtful character with an idealistic streak: a paramedic whose first job out of high school in Sydney was working for Mother Teresa in Calcutta. He shot the the warm-hearted 2008 film Son of Lion, about a Pashtun boy who is desperate to go to school, in Pakistan's remote North-West Frontier. Two years ago, he went back to Pakistan to shoot Jirga - the title refers to a Pashtun tribal council - figuring his cast and crew would be safer filming near the Khyber Pass than in Afghanistan. But the authorities withdrew their filming permission after reading the script - upset with the politics - which led to a Pakistani investor withdrawing his $US100,000 investment.

Stuck without a location, a crew and most of their funding, Gilmour approached his star about taking a risk. As Smith says: "He said we can either go home with nothing or you and I can go to Afghanistan and rewrite the film together, cast people from the street and basically wing it. I was up for it." The two travelled to Jalalabad to start making Jirga in secret. Having bought a camera so he could shoot the film himself, Gilmour employed trusted Afghans as crew and advisors. Having dealt with crises every day a paramedic, he calculated the risks hour by hour. "You can't make a film about courage without having a level of courage yourself," he says. "And being a foreign soldier in Afghanistan is vastly more dangerous than being a filmmaker there." Gilmour, who wants the film to inspire viewers to think differently about war, says Taliban snipers were worryingly close at times.

Director Benjamin Gilmour (left) and actor Sam Smith while making 'Jirga' in Afghanistan. Festival director Nashen Moodley has selected Jirga in the competition for "audacious, cutting-edge and courageous" films.