They caused heartache for millions but now some of China's hated population police - who for years enforced China's one-child policy, ordering families to have abortions or pay huge fines - have a new job.

Two-year-old Liu Siqi is curled up on her grandmother's lap, complaining of a tummy ache. A man tries to divert her with a squeaky plastic duck.

Gradually the toddler's mood brightens. She giggles and is persuaded to join him singing a nursery rhyme.

The man she calls Uncle Li belongs to China's army of family planning officers. Stationed in every city, town and village in China, for the past 35 years their job has been to hunt down families suspected of violating the country's draconian rules on how many children couples can have.

But with the end of the one-child policy at the beginning of this year, some, like Li Bo, are being retrained for a different role. Now he could even be mistaken for a Chinese Father Christmas visiting remote villages in the mountains of Shaanxi province with a bag full of toys and picture books.

Along with 68 of his colleagues, Li is part of a pilot programme involving academics from Shaanxi Normal University and Stanford University's Rural Education Action Programme. His new job is to teach parents and grandparents how to develop toddlers' minds by talking, singing and reading to them.

He works in Danfeng County, 700 miles (1,125km) south-west of Beijing, an impoverished area where more than half the adults of working age have left for jobs in the cities.

Listen to Lucy Ash's radio documentary on Crossing Continents at 11:00 on Thursday 5 May on Radio 4 or catch up afterwards on the iPlayer

at 11:00 on Thursday 5 May on Radio 4 or catch up afterwards on the iPlayer Lucy Ash's television report for Our World can be seen this weekend on BBC World - click here for transmission times

Liu Siqi, like 61 million of her peers, is a "left-behind" child, being raised by her grandparents. Her mother works in a noodle factory four hours' drive away and cannot visit often. Her father, who has a job in a quarry, only makes it home twice a year.

At first her grandmother, Chen Huafen, was sceptical about the value of reading to such a small child. "I thought it was a waste of time," she laughs. "But she likes the stories and I was surprised by how much she remembers about them."

Chen was in her late teens when the one-child policy was introduced back in 1979.

She seems relaxed with Li but I wonder about her own experience of family planning officers.

When he steps out for a smoke, she tells me the whole village "distrusted and hated" the enforcers, who confiscated property if families couldn't afford the fines.

[My daughter] stayed with my mother in the mountains for 12 years before we managed to get her registered Chen Huafen

"They used to come at night and take stuff away from families with more than one child," she says. "Bicycles, sewing machines whatever they could lay their hands on, even our cows and pigs."

Chen has even greater cause to loathe the family planning workers, though. In many rural areas, couples were allowed to have a second baby if their first was a girl.

But Chen's first child was a boy so when she conceived for a second time, she was made to have an abortion. When she got pregnant again she went into hiding and gave birth to a daughter. But she was so afraid of a crippling fine for breaking the rules, the little girl had to live under cover.

If you didn't pay the fine, known as a social maintenance fee, your child didn't exist in the eyes of the state. In practical terms that meant no access to school, healthcare or even the right to buy a train ticket.

"She stayed with my mother in the mountains for 12 years before we managed to get her registered," says Chen.

Since the start of 2016, all Chinese couples have been allowed two children. But they can have no more than that unless they are from ethnic minorities - so Li Bo still spends some of his time working as a birth-control enforcer.

In the town's health clinic he is busy screening local women.

We told couples that more children would lower their standard of living and it was not in their child's interest either Li Bo

All women of childbearing age have check-ups four times a year to ensure they're healthy… and to see if they are pregnant. Until the start of this year if a couple wanted a baby, they had to seek official approval before trying to conceive. The woman's medical history is logged in a little red book. It lists the children she has, contraception she uses and any terminated pregnancies.

After her ultrasound examination, I ask a woman holding the hand of small boy, if she is thinking about another baby. "Not yet!" she laughs. "My husband says it's too much financial pressure."

When I am invited to Li's home to meet his wife and nine-year-old daughter, I ask the same question.

He tells me his parents, especially his mother, had been urging him for years to have another child and pay the fine. "I would like another one," he chuckles, "even though we do worry about money."

People didn't swear at us but they probably did behind our backs - it's natural because we were carrying out the law and they were breaking it Li Bo

He has a playful side and says he relates well to children because he is really "just a big kid" himself.

But Li is also a loyal Communist party official who believes the state knows best and society's needs are greater than those of individuals.

So he is matter-of-fact about the unpleasant task of telling women who couldn't afford the fine to terminate their pregnancies.

"China was facing serious problems with a large population," he says. "We also told couples that more children would lower their standard of living and it was not in their child's interest either."

Image copyright Alamy

When I press him on the numbers of abortions he may have persuaded women to have, he says he doesn't know and looks increasingly awkward, twisting a tissue in his hand.

In some villages people threw stones at family planning officers' cars. Li admits that in many places he was not a welcome guest.

"People didn't swear at us but they probably did behind our backs," he says. "It's natural because we were carrying out the law and they were breaking it so it is just like the clash between a policeman and a thief."

He adds that as long as restrictions are in place, such clashes will continue.

Yet the rules and the amount levied in fines vary drastically from one place to another and from case to case. Authorities generally set them at between three times and 10 times the average annual salary.

Within China, family planning officials' treatment of those who break the rules also varies.

Image copyright Alamy Image caption A mural illustrating China's one-child policy, in Hebei province, near Beijing

Shandong, a coastal province between Beijing and Shanghai, with a population of 96 million, has a reputation for being particularly harsh.

In recent years a string of people accused of having unauthorised children have been illegally detained.

They were kicking my son and slamming him against the floor - I just couldn't bear it any more so I called my daughter-in-law to say 'Let's give up the baby' Grandmother

Many are too scared to talk, but one family agreed to tell me about their experience.

They are nervous and say it is too risky to go to their home so we meet in a restaurant owned by a friend.

I am greeted by a couple in their 60s who farm corn and peanuts and their son, who works in a local factory.

In 2013 the young man's wife conceived without permission - the couple already had a daughter. Despite the relaxation of rules in rural areas, they had been banned from having a second child because their first baby was born before the mother was 20 years old.

So the family hid her from the prying eyes of the family planning officials until she was six months pregnant - at that point they believed the authorities would no longer be able to force her to have an abortion.

They were wrong.

Family planning officers and village leaders stopped the young man on his way home from work and asked him where his wife was. "I told them I didn't know," he says. "So they started beating me."

The one-child policy in numbers

Image copyright AFP

China's government says the one-child policy, officially in place since 1979, has prevented 400 million births - although it has been disputed whether the policy had such a big impact

It is estimated there are now 33 million more men than women in China

By 2050, it's predicted that a quarter of China's population will be 65 or older

The Family Planning Commission has an estimated 500,0000 full-time staff, and once had 85 million part-time employees at the grass-roots level

Read more: Five numbers that sum up China's one-child policy

He was bundled into a minivan and taken to a nearby hotel where the beatings continued.

The wife's sister was also kept prisoner for three days to increase the pressure. She wasn't let out until the family handed over 10,000 yuan ($1,500; £1,060) - allegedly hotel expenses.

Then the parents-in-law were locked up and shown how their son was being treated. They offered to pay an above average fine or social maintenance fee of 70,000 yuan ($10,700; £7,400) to keep the baby but to no avail.

"They were kicking my son and slamming him against the floor," says the mother. "I just couldn't bear it any more so I called my daughter-in-law to say 'Let's give up the baby.'"

As she wipes her eyes with her sleeve, her husband looks miserable and sheepish. Since the detention was unlawful, I ask the couple if they contacted the police.

"I made a phone call to the local discipline inspection," says the father. "But I was told that they couldn't intervene in the work of family planning officers - those guys are so powerful they just do whatever they want."

The baby was well-formed - you could even see his fingernails. He was a bit small, but very well-developed already Grandmother

The family have contacted a lawyer, Wu Youshui, who has a track record of investigating abuses by family planning officers across China.

They are hoping those responsible will be brought to justice and that they will be refunded some of the money they paid, but the young man says the family has been torn apart by what happened.

It is of little solace to him or his wife that China now has a two-child policy.

"The harm is there and there is no way to repair it," he says.

The mother-in-law adds that she went to the hospital and saw the aborted foetus of her grandchild. Three years have gone by but her grief is still raw.

"The baby was well-formed," she sobs. "You could even see his fingernails. He was a bit small, but very well-developed already."

The one-child policy has a bitter legacy - it has caused heartache in millions of Chinese families. The supreme irony is that the country's problem today is not overpopulation, but a shrinking labour force that threatens future growth.

James Liang, a billionaire internet entrepreneur has long argued that an aging workforce will stifle creativity within companies.

"The Chinese government should be really worried," he says. "What it needs is a pro-fertility policy to encourage the people to have more kids, the more the better."

As for family planning officer Li Bo, most of the time his focus is on the next generation. At a time when China may have too few young people to face the challenges ahead every individual counts.

Image caption A mother and baby outside the parenting centre in Shaanxi province

We meet at a new parenting centre in two-year-old Liu Siqi's village. It's part of the pilot project here in Shaanxi province designed to stimulate deprived rural children and give them the best start in life.

He watches toddlers throwing balls into boxes and playing with wooden shapes.

"This is a golden time for them to develop skills," he says. "I like this new job and I think my work is important, because what I am doing right now will probably influence what sort of people these children will become one day."

On my way out of town I pass the old family planning office, a forbidding looking place behind high iron gates - it was closed down and the staff moved to become part of the local health service.

Now the building is dusty and empty and there is a peeling mural on the wall outside of a mother, father, and their single child against an unnaturally blue sky.

Subscribe to the BBC News Magazine's email newsletter to get articles sent to your inbox.