A Canadian man took matters in his own hands after a dog was locked in a sweltering BMW, with temperatures in the area topping 90 degrees (33 Celsius), repeatedly hurling a rock into the windows until one of them broke.

It might seem like an extreme action, but if you read on, you’ll likely come to the conclusion that it was the right thing to do given the circumstances.

Will Costa, who captured the video on Saturday outside a music festival in Great Bend, Ontario, told GlobalNews that plenty of attempts were made to locate the owner without success.

“The announcer, between sets, was announcing there was a dog locked in a vehicle,” Costa said. “The owners were not around and someone had mentioned they had called the police. So we kind of waited around a bit until police showed up or the owners showed up.”

But that never happened and a bystander decided it was time to free the dog from the 3-Series.

“A gentleman in the blue – which you see in the video – he tried pulling down the window, there was a small crack in the sunroof, but nothing was happening,” he said. “As soon as the dog was freed everyone was applauding, even the dog seemed to be happy. He was wagging his tail,” Costa said.

According to Costa, the owners showed up nearly an hour after the dog was freed.

“At first they were confused … they didn’t understand what was going on,” he said. “The man who saved the dog explained what the situation was. At the time they felt they did nothing wrong, they left the window open and claimed that would be more than enough for the dog to be able to breathe and be comfortable.”

Video