One sweltering afternoon last January on a film set in the Cambodian countryside, a local man approached Angelina Jolie with a large bucket of leeches. Jolie peered into the bucket and picked out one of the writhing creatures, studying it as it found its way to one of the prominent veins on the back of her hand and locked on. As it started to gorge on her blood, she carried it over to her nine-year-old lead actor, Sareum Srey Moch, who was sitting in a canvas chair in the shade of a tree.

“This is what a real one looks like,” she said. Sareum wrinkled her nose and stared at the leech. “Does it suck your blood?” the girl asked. Jolie’s 13-year-old son, Pax, on crutches after breaking his foot in a jet-ski accident, hobbled over with his camera to take a closer look.

“Yes it sucks your blood,” Jolie answered after a slight hesitation, already resigned to the likelihood that live leeches might be a step too far for this young actor. She ordered a return to plan A, a box full of dozens of pretend leeches made out of black vinyl and double-pinned to a cardboard backing like biological specimens. The crew experimented with gluing plastic worms of different shapes to Sareum’s leg until both the child actor and Jolie agreed that it looked right. Actor and director high-fived each other and the girl walked back to the paddy field for her next scene.

Sareum plays the part of Loung Ung, who was only five when the Khmer Rouge, as Cambodia’s communist party was known, swept into the capital Phnom Penh in 1975. Over the next four years, they drove its population out into the countryside, executing all those perceived as class enemies. More than two million people were killed, out of a total population of seven million. Ung’s father and mother and two of her sisters were executed.

At nine, Ung escaped to Thailand with her older brother, and they arrived in the US as refugees soon afterwards, with the help of a church foundation. At 30, she wrote her autobiography, First They Killed My Father. On set, Loung Ung, now aged 46, watched playbacks on a screen with Jolie in a small black tent, next to a little corral where brown cattle were being kept for farm scenes. The two women have been friends for 16 years and Ung, who co-wrote the screenplay, was working as a consultant on the set.

Jolie dates the beginning of her involvement in humanitarian issues to her experience making the fantasy action movie, Lara Croft: Tomb Raider, in 2000. In that film, which was released in 2001, Cambodia was no more than an exotic backdrop for the action, but booby-traps and anti-personnel mines planted all over the country in the 1970s were still going off. There was a generation of orphans, then in their twenties, and a country still crushed by poverty, authoritarianism and mass trauma. Soon after filming Tomb Raider was over, Jolie returned as a volunteer for the UN refugee agency, UNHCR, and visiting mine clearance projects. She started giving large amounts of money to UNHCR and became a goodwill ambassador for the organisation.

Jolie was planning to return to Cambodia with UNHCR later in 2001 when Ung’s autobiography landed on her desk. Ung at that time was working for a US Vietnam veterans’ organisation supporting landmine victims in the region. Her office had sent the book to Jolie on the off chance that she might publicise its cause. As soon as Jolie read the book she called Ung. It turned out the two women were to be in Cambodia at the same time. Jolie invited Ung to join her on a motorbike tour of the rugged countryside around the Battambang province in the north-west of the country.

“We travelled to some very remote areas – there were no roads, or hotels or restaurants,” Ung said. “We stopped at the roadsides and ate in people’s homes. And I was so impressed because Angie didn’t travel with an entourage. She will eat whatever, she’ll hang her hammock wherever and get dirty and muddy in the torrential rain.”

Ung taught Jolie the survival skills learned in the camp: how to check for leeches and catch frogs. “We very quickly became friends,” Jolie told me. “We got caught in a monsoon and stayed up at night sitting in hammocks in a pagoda in the rain, which is really fun for the first few hours and then it’s just freezing cold and relentless.”

One day, Jolie spent time playing and talking to children in a school in Battambang. She had no children at the time and says it was at that moment that she decided to adopt a child from the country. “I asked Loung, as a Cambodian, as an orphan, what would she think about that. And she was very supportive about it,” Jolie said. “And we had a talk about what would be important, to make sure he always knew about himself.” Jolie adopted Maddox Chivan, aged seven months, from a Battambang orphanage a year later, in March 2002. “And Loung’s been in his life ever since,” she said.

Jolie and Ung began adapting the book, but then shelved the project in part because Jolie was busy with other movies and because neither thought the political atmosphere in Cambodia was conducive to making a film about recent history. However, last year, Maddox, by then 14, persuaded them to make the film. “He was the one who just called it and said he was ready and that he wanted to work on it, which he did. He read the script, helped with notes, and was in the production meetings,” Jolie said.

In 2011, Jolie made a film about the Bosnian conflict, In the Land of Blood and Honey, for which the cast was entirely made up of people from the former Yugoslavia. The film adaptation of First They Killed My Father uses only Cambodian actors, and the language spoken throughout is Khmer, with occasional snatches of French, the imperial language of French Indochina, of which Cambodia was a part until the 1950s.

“When I said I wanted to make this film and I want to make it in Cambodia, everyone said: you can’t make it in Cambodia. You have to make it in Thailand, like The Killing Fields,” Jolie said. Roland Joffé’s 1984 film was Hollywood’s one major attempt to tackle the Cambodian genocide. It tells the story of a Cambodian photojournalist stranded after the evacuation of his western colleagues, who provide the western point of view for the audience. Jolie’s film makes no such concessions. There are no white characters to explain events in English and she is quite clear that the primary audience is the Cambodian public. The cast and crew are Cambodian.

The film will be launched across Cambodia in the middle of next month, seven months ahead of its release in the US.

Jolie’s humanitarian work marks the third act of her career. Although not the first actor to take this route, she has thrown herself into the role. “I’m doing less film now,” she said. “Not walking away from it all, but ideally doing projects like this one, where you can pull together all that matters to you at the same time.”

While filming scenes that took place in a Khmer Rouge camp for child labourers, Jolie – barefoot and wearing a T-shirt and a large straw hat – strode on to the dusty set after every few takes. It was mid-morning and the heat was still bearable. The atmosphere was of a sprawling, busy, extended family, particularly during the communal meals eaten under canvas. Jolie was relaxed and happy, laughing and joking.

She was clearly in her preferred element, at work but surrounded by close friends and family, and protected – by the remoteness of location and light set security – from the world’s curiosity about her private life. She said later in the day that one of the things she most liked about being in Cambodia was that she would wander in the markets and those people who recognised her, knew her for her philanthropy. “Maybe they’ve seen Tomb Raider but they don’t really watch a lot of movies,” she said. “Really, I’m that odd nice lady who likes Cambodia. If I go to the market, they do recognise me – they just don’t bother me. They say hi.”

The set, a cluster of open-sided wooden huts, was built around a large dirt drill yard hung with red flags. Long lines of young Khmer children in black pyjamas and red chequered bandanas marched up and down, in and out of shot. Others picked rice from a paddy as a drone camera hovered noisily above.

Angelina Jolie, her son Maddox Chivan and Loung Ung on the set of First They Killed My Father. Photograph: Pax Thien Jolie Pitt/Netflix

Most of the time, Ung’s role was as an auntie figure to the child actors, particularly Sareum (who she called “Mini-Me”), dispensing bottled water and advice and spending hours in the Lego tent. Lego is largely unknown in Cambodia because of the country’s strict restrictions on imports, but Jolie brought a large amount of the plastic building bricks with her to keep the children in the cast amused.

For Ung, the Lego tent symbolised the ultimate defeat of the Khmer Rouge. “Lego is brightly coloured, it’s fun and it’s laziness. In the camp you would be beaten or worse for laziness,” Ung said. Her sister, Chuo, witnessed a boy being beaten to death by camp guards who said he was idle.

In solidarity with the girls in the cast, who had to wear their hair in the severe short crop imposed by the Khmer Rouge, Ung had cut her hair and wore black. In breaks in the filming, she and Sareum strolled around as two versions of the same person, 40 years apart.

“When I met Mini-Me, we were both trying to suss each other out. We would walk around each other like roosters,” she said. But she is constantly surprised at how alike they are. “Mini-Me would do something and I would look at Angie and say: I do that!”

In writing her autobiography, Ung sought to recapture what it felt like to experience the upheaval, chaos and horror of life in a child labour camp. The young Ung had only a fragmentary understanding of the events unfolding around her. The film seeks to do the same thing – to show conflict as seen through the eyes of a young girl. To allow the audience to see the world through the young Ung’s eyes, much of the footage is filmed from her point-of-view, four feet off the ground with a Steadicam.

The pursuit of an authentic child’s-eye view had been the film’s defining technical challenge. “When filming adults you shoot over the shoulder and you frame each shot so that it’s interesting,” said Jolie. “With POV it is whatever Loung is focusing on at that moment. It has taken everyone, especially the cameramen, time to adjust and not to try to frame the shot as they normally would.” After a last minute change, Anthony Dod Mantle was hired as cinematographer just a few days before filming began in earnest in November 2015.

“I felt like a Red Cross parcel thrown out of a B52 bomber,” Mantle said. He is known as one of the most insistent innovators in the business and won an Oscar for his work in Mumbai on Danny Boyle’s 2008 film Slumdog Millionaire. “Me and Angie are trying to egg each other on, to be radical.”

Watching her childhood experience of genocide played out on set had a visceral effect on Ung. After arriving in the US at the age of nine, Ung was dogged by a recurring dream of being chased by soldiers determined to kill her. She would wake up just as her pursuers grabbed her. She underwent the same torment night after night until finally, three years later, in a dream, she turned on one of her attackers.

“In my dream, which I remember very vividly, I was in America and he was chasing me and I was running and running and running. I came into a house and there were no weapons there, but what I found was a knife. And I grabbed it and I was trying to cut his head off and it was a butter knife. And I had to really hack at it,” Ung said. “This was when I was about 12 or 13 years old.”

Ung is short and slight, and her frequent smile and inclination to find the humour in almost any setting is at odds with the darkness of her life story. She described being happy as an act of will. As a young woman, she resolved that neither her parents nor her two lost sisters would want to see her spend her life consumed in misery. “So I have purposefully made myself not do that, and the great thing about habits is if you do it long enough, it sticks.”

Even Ung’s choice of career has involved the pursuit of pleasure. She and her husband, Mark Priemer, set up a microbrewery because they couldn’t get decent beer in America. “I thought if I die tomorrow I don’t want to die drinking fizzy water,” Ung said. The couple now run two breweries and three restaurants in Cleveland, Ohio.

Having my hand separated from my sister’s, and seeing my parents being pulled away from each other, that was brutal

“It’s one of those things your girlfriend tells you, and you think: Oh what is she doing?” Jolie recalled. “And then I didn’t even ask about it for a few years because I was worried. We talked about other things like books, and I turn around and she has a crazy number of employees and she’s really successful. It’s Brad’s favourite beer so I have it in my house all the time.” (During the filming, Brad Pitt stayed much of the time in Siem Reap, the resort town close to the ruins of Angkor Wat, helping look after the couple’s children in what turned out to be the final months of their marriage.)

But now that Ung was back in Cambodia for a long period, her hair cut short and dressed in black again after years of wearing the brightest colours she could find, her bad dreams were returning.

Over the course of making the film, she had broken down many times on set. “People are always asking me about war as a survivor,” she said. “They always ask about the bombing, the deaths, the soldiers. And I’ve always wanted to say that yes, those were horrible difficult moments, but having my hand separated from the clasp of my sister’s, and seeing my parents being pulled away from each other, and having to walk away from my brothers and sisters – that was brutal.

“I hope people see not just the horror of war but the love it takes to survive.”

The Khmer Rouge grew out of the communist ferment in south-east Asia that followed the second world war. The Cambodian communist party was taken over in the 1960s by a group of hardline ideologues who had studied in Paris, led by a radio engineer named Saloth Sar – a man who would later take the nom-de-guerre Pol Pot. The communist rebellion was seized upon by Lieutenant General Lon Nol, who ousted the country’s post-independence leader, Prince Sihanouk, in 1970, and countered the communist insurgency with heavy support from the US, which was conducting a secret and devastating bombing campaign along the country’s eastern border aimed at Viet Cong bases.

In its opening sequence, Jolie’s film uses news reports from the time to suggest that the US bombing campaign boosted support for the Khmer Rouge and contributed to the eventual collapse of Lon Nol’s forces in 1975. Loung Ung’s father was a conscripted military police officer in Lon Nol’s army and high on the Khmer Rouge hit list. Those marked for death included anyone educated and therefore corrupted by western ways. Through mass murder, the Khmer Rouge intended to restart civilisation and turn back the clock to “Year Zero”.

Last year, while Jolie was filming, I visited the grave of Pol Pot – the man who had presided over the killing fields. The forlorn and derelict site is in Anlong Veng, on Cambodia’s western border with Thailand, the location of the Khmer Rouge’s prolonged last stand against Vietnamese forces. He died in April 1998, aged 73, waiting for a car that was supposed to be taking him out of the country to appear before an international tribunal. According to the official account, the cause of death was heart failure, though other versions point to suicide or murder.

A makeshift memorial stands over the spot where his body was cremated, amounting to no more than a strip of corrugated metal held up by two posts. A faded blue sign appeals to visitors to “preserve this historic site”, and it has been neither vandalised nor maintained. Dry grass has grown up around it.

The only signs of recent human presence were a small wilted bunch of lotuses, a couple of red candles and a small, locked red tin box. According to a watchman, the only regular visitor is a Thai businessman and gambler, to whom Pol Pot appeared in a dream 10 years ago and provided the winning lottery numbers. The watchman said the gambler comes once a month, taking a break from a new casino built on the border nearby, to leave flowers and fruit. More Thai gamblers have followed his example, hoping to emulate his luck, and recently visitor figures have risen to about 50 a month. With traffic on the rise, a new concrete booth is planned for the watchman.

Anlong Veng was a Khmer Rouge stronghold for more than a decade. Most of the residents are either former regime officials or their descendants, but the vestiges of Kampuchea – as the Khmer Rouge renamed Cambodia – seem to excite no local interest today. A few miles from the neglected grave is the house of Ta Mok, Pol Pot’s military enforcer, and later his rival, jailer and possibly his killer. The squat concrete shell of the house looks out on to an artificial lake that Ta Mok had built, and he decorated the walls with murals of the Angkor Wat temples. The murals are now covered with graffiti scrawled by lovers inspired by the romantic views.

Angelina Jolie with Loung Ung on the set of First They Killed My Father. Photograph: Pax Thien Jolie Pitt/Netflix

The local government half-heartedly advertises the place to sightseers and a handful pass by each day. Kearn Sarin, a stocky man in a military jacket and a chequered Khmer scarf around an olive green cap, works there as a guide. Kearn was a bodyguard for Ta Mok until he was arrested in 1999. Ta Mok died in 2006 awaiting trial for genocide and crimes against humanity.

Kearn remains a staunch defender of the Khmer Rouge, which he first joined as a teenager. He had heard about Ung’s book and the film, but dismissed it as “one person’s propaganda”. “It doesn’t tell the good actions done by the Khmer Rouge,” he said. “In Kampuchea, there was no rich or poor. Everyone was on the same simple level. Now the gap between rich and poor is big again.”

There are various small-scale shrines and memorials to the genocide around Cambodia, but there is only one war museum, in Siem Reap, where the hulks of ruined Soviet-era armoured cars, tanks and helicopters sit under a grove of mango trees. On either side, there are old guns stacked on wooden stands and a rather patchy account of the country’s long nightmare. Behind a pane of glass, a one-page summary of the Khmer Rouge regime makes no mention of the killing fields and the two million dead, just “a radical attempt at social engineering”. Other pictures on display are Khmer Rouge propaganda shots, most of them labelled: “Khmer Rouge troops go from place to place.”

Very few Cambodians come to the museum. “People don’t talk about the war. They don’t want to,” said Moun Sinath, who works as a guide at the museum. “It is difficult to talk about because there are some of the Khmer Rouge people still running the government.”

A foreigner coming to Cambodia to make a film about such an excruciatingly painful episode in the country’s history faces a delicate task. Every step along the way, from securing permission to film, to arranging movie screenings, has required patient negotiation. Not only are many former Khmer Rouge members still in positions of influence, Jolie had to navigate deep scepticism about foreigners in general. As Youk Chhang, the executive director of the Documentation Centre of Cambodia (an NGO dedicated to researching the history of Cambodia under the Khmer Rouge), points out, between occupation by the French, the later invasion by the Vietnamese and repeated bombing raids by the US, there is a lot for Cambodians to be wary about.

Chhang is a supporter of Jolie’s film, but he said there were some, including the country’s young film-makers, who felt they were better placed to tell the defining story of their parents’ lives. “It has to be understood that Cambodians’ mistrust of foreigners has deep roots,” he said.

However, Jolie is a Cambodian citizen – she was awarded the honour in 2005 in recognition of her conservation work – and she has a Cambodian son. Furthermore she undertook the project as part of a team with Ung, her co-producer Rithy Panh, who is an internationally celebrated film-maker in his own right, and an all-Cambodian cast.

“Because I did it in partnership with Luong and Rithy, it really wasn’t me leading it. It never was. And every day on set, it really wasn’t. I had to always defer to the Cambodian people who were there,” Jolie told me. “It’s not my story.”

These partnerships, and Jolie’s own diplomatic skills, also helped smooth the way with the government in Phnom Penh.

Cambodia’s quiet ambivalence about its own genocide goes to the heart of the establishment. Hun Sen, Cambodia’s prime minister since 1985, was a battalion commander in the Khmer Rouge but fled with his unit to Vietnam to escape a party purge in 1977. He was subsequently a commander of Cambodian rebels that formed part of the Vietnamese invasion force two years later, and was originally part of the government set up under the Vietnamese occupation. Since then he has presided over a managed semi-democracy, in which elections are held, but with a carefully controlled media and widespread allegations of vote rigging.

A joint UN-Cambodian court was set up in 2006 to try surviving Khmer Rouge leaders, but Hun Sen’s government limited its scope. Just five former leaders have been indicted – three were convicted and two died during their trials. Wider public debate on the genocide has been discouraged by the government until recently. The basic facts of what happened under Khmer Rouge rule only began to be taught in Cambodian schools four years ago. Jolie’s film is being made at a moment of transformation.

“A decade ago to talk about certain things [felt] very different than it does today. I don’t know what that is attributed to. It could be because it’s a certain generation change,” Jolie said.

“But I wondered if there were would be restrictions over making the film. I wondered if they’d say: You can’t do this here or here, because the country is too sensitive and we don’t want to see this in the streets. Or maybe someone would say, “Oh it wasn’t as bad as this – it’s blown out of proportion”; or some kind of advice to tone it down. But quite the opposite – we’ve had encouragement to be as accurate as possible.”

The world premiere of First They Killed My Father will be held in Siem Reap on 18 February, seven months before its global release via Netflix. “I went to [Netflix] directly,” Jolie said, “because I want to make the kind of film where I don’t have to compromise and put a famous Chinese actress in as the mother, or make it in a different language in order to get people in the theatres on the first weekend.”

After all the labour camp scenes had been filmed, the crew had to set fire to the wooden huts for one of the climactic moments of Ung’s story, an attack on the camp during the Vietnamese offensive of 1979. Pyrotechnic specialists spent an afternoon rigging up burners and priming the straw roofs of the huts with fuel.

There would be just a narrow window for filming a long tracking shot following the young Ung into the blaze, and Jolie was in her black tent planning it. She had been violently sick the night before and looked frail but insisted she had “stabilised”. The shoot only had a few “insurance days” to cover the cost of over-runs, so nobody, least of all the director, could afford to be sick for long. Other crew members had collapsed or succumbed to hallucinations while trying to work through sickness.

Jolie was trying to determine whether it would have been a mortar or rocket that set the camp alight, and how each would make it burn. An added complication was the fact that the local farmer did not want any damage done to his wooden hut. A fire truck would be parked nearby in case it was ignited by stray sparks.

Huts are set alight for the climactic scene of First They Killed My Father. Photograph: Pax Thien Jolie Pitt/Netflix

As the evening darkened on the set, the wooden huts were set alight, and Sareum, playing the young Ung, was filmed running across the parade ground surrounded by flames, calling for her sister. In a nearby field, children were running away from the flames, followed noisily by a pig. Actors playing Khmer Rouge soldiers ran the other way across the open field carrying AK-47s. A row of latex corpses of dead fighters had been lined up under a tree ready for dispersal around the battlefield.

Off to the side of the field, most of the crew had turned up to watch the set go up in flames. Brad Pitt, in a flat cap and T-shirt, had come with four of the couple’s children.

It is hard to predict what the emotional response of Cambodians to the film will be, but for those of the cast and crew old enough to remember the Khmer Rouge, the effect of making it has been devastating.

“Here everyone has been through it. Everybody is standing 10 feet away from someone else who has been through it. They’ve been helping each other as they always have,” Jolie told me. Before shooting started, she had made sure there was a Cambodian nurse with on set with experience of working with post traumatic stress.

“People were so badly treated and so dehumanised,” said co-producer Rithy Panh, “they had no great desire to recall what happened, to talk about when they had to eat roots and insects to survive. And what could they say? I am alone, I survived but I couldn’t save my parents? I find this long silence normal.”

Panh was 11 in 1975. He too lost his parents and siblings and ended up in a Thai refugee camp in 1979. Out of a dozen-strong household in Phnom Penh when the city fell, only he and one older sister survived. Now aged 52, Panh is a softly spoken man with round head and a goatee shielded by a wide-brimmed hat. He was seated at a desk in a recreation of a Khmer Rouge classroom with a straw roof and no walls.

Panh’s documentaries were the first to break the Cambodian silence. In his 2003 film about Tuol Sleng, the most murderous of Khmer Rouge prisons, known as S-21, the handful of survivors from the jail confronted their former prison guards. His films won prizes abroad, but were barely seen in Cambodia. “People were saying I should make films about how beautiful the country is,” he said. “It’s only the young who watch my films.”

“The film that Angelina is making is important because it perhaps permits a new generation of young people to find out what happened to their grandparents. It’s not the sole solution. It’s just images, but it makes them able to face up to their history and understand.”

Finally, Panh added, the film demonstrates his country’s resilience. “They couldn’t destroy us. This creative act shows that we are able to express our history. There are those who say that after all that happened here, poetry is not possible any more. But I say we need more poetry. We need poetry, for creation, for imagination, to allow people to come through all this, turn their back on it and move forward.”

With a month to go before the film is shown in Cambodia, Jolie was at home in California, fretting about the complication of what “general release” might mean in a country largely without cinemas and a population that has not confronted the realities of its genocide.

“There are many smaller screenings we are going to be doing, which I am most excited by. It may just be a sheet and a projector out in a pagoda in the more remote areas,” she told me in a recent telephone interview.

Whether it will be possible to show such a film in the Cambodian countryside will depend on the availability of monks or therapists to help organise the screening and deal with the fallout. There will be time set aside for discussions after the screenings, and in some places Jolie plans to set up town hall meetings the morning after so that she and the cast can answer questions.

Judging from the experience of making the film, the reaction among ordinary Cambodians will be highly charged and emotional. In the best cases, it will also be hopeful.

“I tried very hard to make a film that is not just about policies or politics or war,” Jolie said. “It is a film at its core about the Cambodian people and family, and love, and survival. I hope that there will be a sense of pride for the Cambodian people when they see it, about what they survived, and who they are.”

• Follow the Long Read on Twitter at @gdnlongread, or sign up to the long read weekly email here.