Abbotsford police are issuing a public warning after they were forced to smash the windows of two cars to rescue toddlers stuck inside in the sweltering heat.

On Tuesday, a mother gave her one-year-old daughter the keys to their car to distract the girl as she made her way around the vehicle.

Unfortunately, the girl quickly figured out how to use the key fob and locked her mother out.

Then on Wednesday, another mother accidentally left her keys in the car, locking her two-and-a-half-year-old inside.

In both cases, the children were overheated, but otherwise unharmed.

Police say drivers need to be mindful of the hazards associated with the hot and unventilated conditions created inside a vehicle.

"Most people understand it’s not a good environment to leave a pet or a child —and yet, for whatever reason, Abbotsford police and other first responders have to remind people every spring and summer," Const. Ian MacDonald said.

"I guess we're adding to that reminder to make sure you inventory your keys before you go to lock your car door as well."