It could have been much worse.

Their apartment could have been destroyed. Their neighbors displaced. The two children inside injured.

But when a pan fire broke out at a Burnsville apartment on Dec. 1, the fire was quickly, completely extinguished. Fixated under the range hood were contraptions called StoveTop FireStops — which did exactly that. Burnsville fire crews needed only to ventilate the unit.

“It’s a passive protection system,” said Douglas Nelson, the city’s assistant fire chief and fire marshal.

The automatic devices release a fire-suppressing powder when activated by a large stovetop flame. They fasten with a magnet to a range hood and are sold online or at hardware stores for about $46 a pair. (Each one covers two burners.)

“For perspective, you have an apartment fire like this and these weren’t in place and you have a full-blown kitchen fire,” Nelson said. “At the very minimum, you are going to displace the residents of that unit, and if the fire grows large enough, potentially the entire complex. So $50 seems like a lot of money, but this particular can took care of the fire, and the damage was minimal.”

On Dec. 1, fire crews arrived at the building in the 14000 block of Portland Avenue, where they smelled smoke on the first floor, according to a news release.

By the time firefighters got there, the fire had been extinguished.

“Because the device had put out the fire, there was no damage to the kitchen or apartment unit,” according to the news release.

Upon arrival, crews found two young residents hiding in the bathroom. They told authorities that they accidentally started the fire while trying to cook. The cause of the fire was ruled an accident.

“This is just another tool in a toolbox,” said Chief Deputy State Fire Marshal Jim Smith. “But clearly our message is to always be in the kitchen while the stove is on.”

Somewhat unknown, the device has been around for years.

In 2012, using a federal grant, the Burnsville Fire Department supplied almost 1,000 StoveTop FireStops to several apartment complexes, including the Portland Avenue building.

The kitchen is one of the most dangerous areas for fire, Nelson said.

“We’ve seen the benefits of [FireStops] and encourage people to install them,” Nelson said. “They’ve saved a lot of damage.”