Brown said the woman followed the spirit of New York’s Safe Haven law. The law allows a parent to leave a baby no older than 30 days at churches and other designated locations. Her baby was just hours old and still had his umbilical cord when he was found.

The law requires someone be present to receive the child, but that did not happen Monday. Instead, the baby was discovered by a church custodian who heard him crying. The baby was in good condition, according to local reports.

The mother was seen on surveillance video buying towels at a dollar store and then again, a short time later, entering the church with the baby and leaving without him. She told police she returned the next day to make sure the baby had been found.

The woman told police she left the baby wrapped in a towel in the manger of the Holy Child Jesus Church in Richmond Hill because it was the warmest place in the church.

>> Watch: Parish priest talks about discovery of the newborn

The child was in protective custody Wednesday.