Spanish police have rescued a newborn baby boy from an underground trash container where it had been dumped in a backpack inside a plastic bag.

Civil Guard spokeswoman Ana Martin said the baby, estimated to be between one and two weeks old, was found Wednesday morning in Mejorada del Campo, a town east of Madrid. She said police were tipped off after a man walking his dog near the container heard the baby's cries.

Firefighters helped police officers open up the container, which has a street-level opening but the trash is collected underground.

Martin said the baby was taken to a nearby hospital and was in good health. She said police have opened an investigation to try to identify the parents.