The mother of a baby who became stuck in a toilet pipe in China will not be prosecuted, according to a local police official, who said the woman gave birth unexpectedly while in the lavatory.

The newborn fell into the squat toilet and became stuck in the tube, said a police spokeswoman in Jinhua, in the eastern province of Zhejiang.

Firefighters and doctors spent nearly an hour taking a section of the 10-centimetre diameter pipe apart piece by piece with pliers and saws before they could recover the boy, whose placenta was still attached.

The 2.3 kilogram baby boy was stuck in the tube for two to three hours. Remarkably, he is healthy, despite some cuts to his face and limbs.

He was taken to the Pujiang People's Hospital where nurses dubbed him Baby No 59 after the number of the incubator they placed him in.

The head of the hospital, Wu Xinhong, said the infant was healthy and ready to be released.

"His condition is good but his relatives have not come to pick him up yet," he said.

A police spokeswoman said the mother was in serious condition due to complications from the delivery, while authorities were still looking for the baby's father.

The officer confirmed the 22-year-old woman, who is unmarried and had kept her pregnancy secret, will not be prosecuted. She refused to give further details.

"Our investigations showed it was an accident," said the officer, who did not want to be named.

The news triggered hundreds of thousands of comments on China's hugely popular social media site Weibo, with users expressing good wishes for the baby and fury at those who presumably abandoned him.

AFP