BOZEMAN, Mont. -

Three homes just south of Bozeman had to be evacuated due to a heavy gas leak in one house that could have caused an explosion.

Gallatin Gateway firefighters were on scene just four minutes after receiving the call. Turns out a dog somehow switched a knob on the stove dispensing gas into the house while the homeowner was away.

She discovered the leak upon returning home and firefighters say things could have ended much worse.

"Man's best friend went and jumped on the stove and turned the gas stove knob on and the gas has been going for four or five hours in the house.  So it's accumulated throughout the house, the hot air furnace was actually distributing the gas throughout the house.  So we're very fortunate there was no explosion," said Assistant Chief of the Gallatin Gateway Fire Department Kevin Lauer.

Lauer said the homeowner had the right reaction, once she smelled the gas she left the home and called 911.

"The safest thing to do is call 911, back out of the situation because most people don't know how to handle it," he said.