Doctors on Wednesday hailed as a "miracle" the survival of a newborn girl found several days after being buried alive, as police hunted for her parents who have been charged with attempted murder.

The nearly eight-day-old baby was found in a clay pot by a father Thursday when he was digging a grave for his own newborn daughter, who had died the day before, in a village in northern Uttar Pradesh state.

The premature infant weighing just 1.1 kilogrammes (2.4 pounds) was taken to a government hospital in a critical condition with severe dehydration and blood infections before being transferred to a private hospital.

"It's a miracle that she survived being buried for so long," her doctor Ravi Khanna said.

"The baby must've remained buried for 2.5 to three days because she was very emaciated from her cheeks to her neck, her stomach and legs."

The girl, who is in an incubator, was now "out of danger" and responding to antibiotic treatment, he said.

"We are feeding her milk via a tube and also slowly increasing the quantity of milk being fed to her," Khanna added.

"The baby's weight has improved from before and is currently 1.2 kilos and the baby's condition has improved a little as well."

Doctors and police said the baby could have been buried for more than two days in the pot, which had some holes in it.

The baby girl, who is in an incubator, is now 'out of danger' and responding to antibiotic treatment, doctors say
The baby girl, who is in an incubator, is now 'out of danger' and responding to antibiotic treatment, doctors say AFP / Rohit UMRAO

Lead investigating officer Pradeep Singh said his team was searching villages near where she was found and asking about recent pregnancies.

"We have filed an attempt-to-murder case and one for endangering the life of the child against unnamed parents," Singh told AFP.

He added that she would be sent to a government-run adoption home after she is discharged from hospital.

But a local politician from the national government's ruling party, Rajesh Kumar Mishra, who is paying for her treatment in the private facility, said he would adopt the girl he called a "miracle".

"Can you imagine a newborn surviving such a situation for so many days? She is God-sent and I have decided to adopt her," Mishra told AFP.

The lawmaker made national headlines in July when his daughter, then aged 23, accused him of sending his henchmen to kill her and her husband over their inter-caste marriage.

The couple publicly severed their relationship with him and remain in hiding.

Male children are traditionally seen as breadwinners in India, while girls are still regarded as a financial burden by many families as they require hefty dowries to be married off.

Sex-selective abortion, infanticide and the death of girls through neglect have left the country with a huge and alarming gender imbalance.

The skewed sex ratio stood at 940 females for every 1,000 males according to the 2011 census.