The baby boy is healthy and is recovering at a hospital. (Representational)

An attentive dog in northeastern Thailand is being hailed as a hero after finding and saving an infant allegedly buried in a field by his teenage mother, police said Saturday.

The newborn was lying under a layer of dirt near a farm in the Chumpuang district of Nakhon Ratchasima province but was found the same day -- May 15 -- by a curious canine named Ping Pong.

The dog dug around the area and began barking, alerting his owner a cattle herder, who went to the site.

"I don't think it was long after his mother buried him before the dog found him," case officer Panuvat Udkam told AFP.

He added that the boy was healthy, was recovering in hospital, and was so young he had not been named yet.

The teenage mother was charged with attempted murder and abandonment of children.

Officer Panuvat said the suspect was 15 years old and had tried to dispose of the child because she was afraid her parents would get angry.

"So after she delivered the baby by herself she buried it," he said.

Local media coverage hailed the achievement and social media users praised Ping Pong's good deed.

A dog is the "best friend" of human beings, a Facebook user commented on the page of media outlet Khaosod English.