A man digging a grave in northern India found a newborn girl buried alive, police have said, in the latest case to shine a spotlight on female infanticide in the country.

Hitesh Sirohi had gone to bury his own daughter, who died a few minutes after birth on Wednesday, when his spade hit an earthen pot, local police in Uttar Pradesh state told AFP.

“When he noticed a newborn girl inside it, he immediately rescued her and dialled ... for help.”

Sirohi told the Times of India he found the baby wrapped in a cloth and crying.

“At one point I thought that my daughter had come alive. But the voice was actually coming from the pot,” he told the newspaper.

The newborn was taken to hospital where she is receiving medical care, police said, adding that a local politician was paying for her expenses.

Female infanticide has become widespread in India because of parents’ preferences for sons – who are viewed as investments and heirs – while girls are seen as a liability.

Local politician Rajesh Mishra with the newborn girl who was found after being buried alive. Photograph: Rajesh Mishra

India is trying to bridge the sex ratio gap with tough laws, as the country fares badly with 940 females for every 1,000 males according to the 2011 census.

Prenatal sex determination was outlawed in 1994 but families still use illegal methods or devices to discover the gender and terminate pregnancies for unwanted female offspring.

A 2011 study in the British medical journal The Lancet found that up to 12 million girls had been aborted in the last three decades in India.

In January, a three-week old baby girl was found buried alive in Rajasthan state after locals heard her crying from a shallow grave, but died after a few weeks at a hospital.

In 2017, police in western Maharashtra state recovered 19 female foetuses from a sewer near a clinic.

A doctor was arrested and charged with illegally aborting female foetuses for parents desperate for a boy.