Image caption Photojournalist Tim Hetherington, centre, died in 2011

When Sebastian Junger began to piece together the last hours of a photographer killed in Libya, it led him to make a film about his friend's life, a work which receives its world premiere on Sunday.

Tim Hetherington's most acclaimed assignment took him from a remote US Army outpost in Afghanistan to the Oscars.

In April 2011, the British-born photojournalist attended the Academy Awards with Sebastian Junger, author of The Perfect Storm. Restrepo, their film chronicling the lives of a platoon of soldiers stationed in the Korengal Valley near the border with Pakistan, had been nominated in the Best Documentary category.

Less than two months later, Hetherington was dead.

He bled to death on his way to hospital after being hit by shrapnel from a mortar blast in the Libyan city of Misrata. The explosion also killed fellow photographer Chris Hondros and injured two others.

In an attempt to find out more about Hetherington's last hours, Junger began talking to friends and relatives.

Tim Hetherington, 1970-2011 Born in Liverpool, held dual UK/US citizenship

Awarded 2007 World Press Photo of the Year for coverage of US soldiers in Afghanistan

Killed in a mortar attack in Misrata in April 2011

He had been capturing images of fighting between Colonel Gaddafi's forces and Libyan rebels (with whom he is pictured above) More from BBC picture editor Phil Coomes A film from 'the valley of death'

"I had a lot of questions about how he died. I organised studio interviews with anyone who could shed any light on what happened," he told me from his home in New York.

"I thought if I'm going to talk to them then I should record them. If I'm going to record them I should videotape them - and if I'm going to videotape them, then I should make a movie."

The result is an HBO documentary, Which Way is the Front Line From Here? The Life and Times of Tim Hetherington, which receives its world premiere at the Sundance Film Festival in Utah on Sunday.

The film traces Hetherington's career from promising student at Cardiff University to award-winning photographer.

A biography by the writer and journalist Alan Huffman will follow in March.

"He was 40 when he died and was clearly heading for extraordinary places as a photographer, as an artist, and as a human being," Junger says. "I was really eager to see where this guy was going because I knew it would be interesting."

The demands of a month-long book tour meant Junger had little opportunity to grieve in the weeks following his friend's death. By the end he was, by his own admission, "more or less a mess".

The work of Tim Hetherington

Image caption This picture of an exhausted US soldier resting in Restrepo bunker in Afghanistan won the World Press Photo of the Year Award in 2007. Image caption Hetherington was drawn to West Africa from early in his career, and returned again and again. During the 2003 conflict in Liberia, he lived behind rebel lines... Image caption ... where he photographed Sekou, a young soldier with the rebel group Liberians United for Reconciliation and Democracy (Lurd), sitting in an abandoned classroom. Image caption Another striking image from Afghanistan, as the US military used white phosphorus incendiary bombs against insurgents around the village of Donga in 2007. previous slide next slide

"I did exactly what soldiers do. They defer all of their emotional reactions until they have enough time and safety to process it - but that costs you," he told me.

Tim was minutes away from the hospital when he died Sebastian Junger

"It's like a credit card debt. You pay later but you pay 30% more. I was very, very emotional all summer and not really very stable. I had a lot of really horrible dreams. I'm guessing that the cost was higher than it would have been had I been able to focus on the tragedy when it happened."

As Junger began to investigate the circumstances of Hetherington's death, he learnt that he might have survived if he had received battlefield first aid.

"Tim had a femoral artery bleed. I assumed that was a death sentence because you lose a lot of blood really fast. But a retired British Army medic told me that although it's really dangerous, there are things you can do in the field to slow down the bleeding."

The discovery led him to set up Reporters Instructed in Saving Colleagues (RISC).

The non-profit organisation provides free training and medical packs to freelancers unable to afford the expensive courses offered to staff journalists.

"Tim was minutes away from the hospital when he died," Junger says.

"Had I been with him and uninjured, I would have had to watch him die because I would not have known what to do myself. I would have lived with tremendous guilt for the rest of my life."

Image caption At his funeral, a floral tribute from the people of Misrata to "our hero"

Despite working in some of the most dangerous and challenging countries in the world, Junger says his friend was not a risk-taker by nature. Some accounts of his state of mind on the day he died are at odds with the person he knew.

"Tim was very cautious and smart about risk and not a cowboy at all," he says.

"The descriptions of him on that last day in Misrata were that he was quite electrified by the level of combat and the access to the frontline. When I talked to people who were out there it felt like there was a bit of safety in numbers.

Media playback is unsupported on your device Media caption Tim Hetherington in his own words

"To me, that was slightly different than the Tim I knew in the Korengal. I get the feeling he lost his innate sense of caution a little bit."

Junger admits that returning to Sundance without his friend will be an emotional experience. The pair received a grand jury prize at the festival for Restrepo three years ago.

He hopes, however, that his documentary will communicate Hetherington's genius, his bravery and his humanity.

"There are lots of brave war reporters who aren't thinking in particularly complex ways about art. There are lots of brilliant artists who wouldn't be caught dead getting shot at. There are plenty of brilliant and brave people who are not particularly compassionate," he says.

"Tim was truly all three and it made for an absolutely extraordinary person."