The body of newborn baby, still with umbilical cord, was found on Friday morning at a waste management plant at Los Ruices in Málaga.
The rubbish is collected daily in Málaga, which means the body was theoretically dumped in a waste container on Thursday night.
Organic waste not passing through the filters at the recycling plant is transferred to a different area for compacting, and it was at this stage that the baby was found. An autopsy is being carried out and police have begun an investigation to determine the origin of the baby.