China has started ranking its citizens through a social credit system. The good are rewarded and the bad are punished.

It wasn’t until acclaimed documentary-maker Nanfu Wang moved to the US and had a child of her own that she began to look at her upbringing in China in a whole new light.

In a harrowing and deeply personal new documentary — One Child Nation — that’s screening at this year’s Sydney Film Festival, she describes the rush of emotions and memories from her own childhood that came flooding back after she’d given birth.

It set her off down a path of re-examining one of the world’s most well-known, but often misunderstood, pieces of population-control legislation — China’s one-child policy.

What she discovered about her country of birth, and her own family, would shake her to the core.

“China said it was starting a war against population growth, but what it really started was a war against its own people,” she said in the film.

Introduced in 1979, the Chinese Communist Party’s controversial policy was enforced over three decades before being eliminated at the end of 2015 — and propaganda extolling its virtues was plastered everywhere.

One Child Nation shows how deeply embedded this distorted message was, and still is, in Chinese minds, while the horrific consequences of the policy’s implementation are still not recognised.

Along with co-director Jialing Zhang, she discovered how little she knew about the forced sterilisations, mass abortions, child abandonment and state-sponsored kidnappings that took place over three decades.

She spoke to a village leader who said he was forced to destroy the homes of those who had more than one child and how party officials would descend on a community where women refused to be sterilised.

They would strap them to wooden frames “like pigs” and drag them away for forced sterilisation.

“It was really f**ked up,” the village leader recalls in the film. “I couldn’t bear to watch.”

The filmmakers also spoke to a midwife who said she carried out between 50-60,000 sterilisations and abortions, saying she counted this “out of guilt” because she “aborted and killed babies”.

“Many I induced alive and killed,” she said. “My hand trembled doing it. But, I had no choice. It was the Government’s policy.”

Others said foetuses were aborted at eight to nine months, and many were still alive at the time.

The filmmakers show how these “family planning officials” were received like “national heroes” in televised award ceremonies for their work.

They also spoke to artist Peng Wang who has compiled haunting images of discarded foetuses thrown into rubbish tips across China, often in yellow plastic bags that have words “medical waste” printed onto them.

Speaking at a Q&A session in Sydney last week, co-director Zhang said the images were so confronting the filmmakers had to think long and hard about whether they could include them in the film.

She decided, ultimately, the policy’s true horror must be laid bare and there were audible gasps as the images hit the screen at Sydney’s State Theatre last week.

“The reality was so ugly that we shouldn’t shy away from it,” she said.

There were also gasps as Wang spoke to her own family about the impact of the policy in the film — detailing horrendous stories of child abandonment.

They described how baby girls were left out in the marketplace — because families wanted their only child to be a boy — where they were feasted on by mosquitoes and died of sun exposure.

“Maggots were all over their dead bodies,” said Zhang’s aunt in the film.

Fearing this would happen to their children, many families decided to give their newborns over to human traffickers who would sell them on to orphanages.

Filmmakers spoke to one trafficker who said he had sold 10,000 babies to orphanages for $US200 a child.

“Then they (the orphanages) would put them up for international adoption,” he told the filmmakers. “Using the overseas adoption money, they’d pay for more babies from traffickers, perpetuating this cycle of transactions.”

The film then looks at the impact of this mass separation of families and how those who have been split are still reconnecting with each other around the world.

Despite the horrific stories uncovered by the film’s directors, many of the people they spoke to in China defended the one-child policy — saying it has saved the nation from famine. Others said they had no choice but to go along with it.

Speaking after the Sydney screening last week, Zhang said there was a “real sense of urgency” that she and Wang should make this film now before China glosses over the impact of the once-child policy.

“We felt like we had to tell this story now before it’s forgotten and lost forever,” she said.

Once the one-child policy was abandoned in 2015, she said propaganda had been shifted to show how benevolent the two-child policy was — while skeletons still linger in the closet of tens of thousands of Chinese families.

Zhang said this is because the conservative culture in China results in a great sense of shame when talking about such distressing issues, and families find them impossible to discuss openly.

“Many of the stories we hear in the film, like Nanfu’s uncle abandoning his girl in a meat market and her aunt giving away her baby to a human trafficker — Nanfu knew something about it growing up, but they never talked about details, and she never asked,” she said.

“I think it’s kind of like a taboo in the family to touch upon this topic and it was like opening a lot of wounds to interview them.”

She hopes the film — which scooped the Grand Jury Prize at this year’s coveted Sundance film festival — will open up a conversation about the one-child policy.

However, she conceded it was unlikely the documentary would be aired in China any time soon given how cautious they had to be while filming it.

She said they were followed by secret police despite taking steps to avoid detection, and they edited the footage in the US.

“Maybe sometimes we were just being paranoid,” she said. “But, it’s good to be paranoid because we wanted to finish this film.”

One Child Nation is being screened as part of the Sydney Film Festival.