A firing control apparatus and method for installing in a firearm, the apparatus comprising: an energy storing mechanism configured to store mechanical energy which is produced by a mechanical system, upon firing the firearm or by manual operation of the firearm, an electromagnet configured to control the energy storing mechanism, wherein the energy storing mechanism holds or releases the mechanical energy to prevent or enable the firearm from firing, and a processor or an electro-mechanical switch configured to activate or deactivate the electromagnet to control the operation of the energy storing mechanism according to preselected rules.