Turn off power to the electrical system. If an electrical system begins sparking or a fire ignites at a wire, appliance, or outlet, then cutting the power to the system is the first, best step to take.[4] If the source is only sparking or the flame has not yet spread at all, this step alone may be enough to extinguish the flame.
o You should cut the power at the breaker box rather than turning off the wall switch connected to the outlet.[5]
o If the problem stems from wiring or an appliance, do not simply pull the plug on the device. The electrical problem occurring could very well be creating an electrocution hazard as well.