An infant was left unattended for almost an hour in a car parked at a Markham Costco on Tuesday evening, police say.

York Regional Police say they arrived at 6:18 p.m. at a Costco location on Yorktech Drive near Woodbine Avenue and Highway 7.

Const. Laura Nicolle says a passerby noticed the two-month old baby inside the car, with no parents in sight.

"A witness had basically called 911 reporting that a baby was left in a car and was crying with the windows up in the vehicle," she said.

Officers arrived and smashed in the window in order to get the baby out.

The baby was treated at the scene by paramedics and was OK.

Police say they found the parents about a half an hour later. They have been charged with leaving a child unattended.

Happens 'every year,' police say

Const. Nicolle says every year police get calls for children, elderly people and pets left in hot cars.

"Even just the temperature inside the vehicle alone, it could potentially be life-threatening, but beyond that there are so many other circumstances that could happen. Taking your eyes off an infant even for a second is incredibly, incredibly risky," she said.

Under the Child and Family Services Act, a parent can be charged for leaving any child under 10 unattended.

Officers have notified The Children's Aid Society of the incident.