What could have been a nightmare for one frustrated mother turned into a hilarious tale which she plans on sharing with her 14-month-old son when he's old enough to appreciate it.

Kirsty Green was shopping with her toddler, Brandon Emery, at the grocery store Lidl in Bude, England, last weekend when the mischievous incident occurred.

RELATED: Viral Video of Toddler Singing 'Jolene' Warms Dolly Parton's Heart

Brandon kept trying to stand in the shopping cart as Green attempted to unload her groceries in the trunk. To prevent him from falling, Green put him in the backseat.

"So I opened the car and the boot [trunk] and put Brandon in the car, placed my keys down in the boot and unloaded the shopping," Green told CBS News. "Not having a second thought about the keys I closed the boot and could see that Brandon had climbed into the front of the car and was happily playing with the steering wheel."

As Green walked around the car, Brandon quickly smacked the lock down — "whilst grinning." He was locked in, all smiles behind the wheel, and she was locked out.

Brandon Green takes a nap in the back seat of his mom's car. Facebook/Kristy Green.

Luckily, a woman and her mother nearby saw what happened and stopped to help. She called the local fire department and within a few minutes a group of five firefighters from the Bude Community Fire Station arrived.

Make it easy to keep up to date with more stories like this. Download the WFMY News 2 App now.

"They did everything they could to not smash the window until Brandon decided to put [a coin] in his mouth," Green said.

Then, of course, Green agreed to the window being smashed.

The firefighters smashed the rear window, climbed into the car and pulled Brandon out, uninjured and still grinning.

"The car can be fixed, my son is irreplaceable," she said.

It was a frightening moment for a minute or two, but Brandon is safe, and now Green says it's just a funny story to tell — and very telling of his spunky personality.

"He was clearly traumatized by the whole ordeal," Green joked about the toddler with the mischievous grin on his face. "He thought it was great fun as you can see from the photo."