The baby boy, who is about 10 days old, was found by police Wednesday in a bin in the village of Mejorada del Campo, around 20 kilometres (12 miles) east of Madrid.
The tiny infant, who escaped serious harm, was found in a backpack concealed in a plastic bag.
Madrid prefect Concepcion Dancausa told reporters that a baby’s bottle found next to the child led to the mother.
The brand of bottle was one used by the local Alcala de Henares hospital.
By examining the hospital’s recent birth records, they discovered the name of a 37-year-old Colombian woman who lived just next to where the child was dumped, Dancausa said.
The woman, who has three other young children, initially denied disposing of her baby but later confessed, the prefect added.
Her motivations were unclear.
The three other children are being looked after by their father, who appeared to have no involvement in the abandonment of the baby, the authorities said. -AFP