How to keep a relay closed until electricity is given again
Latching Relays


  Latching relays have a small metal strip that, in essence, revolves
  between two terminals. Solenoids, or small coils of wire, can be found
  on either side of a magnetized switch that has one input and two
  outputs at these terminals. The switch can be used to toggle one
  circuit on and off, or it can be used to switch power between two
  circuits. It's the coils that control the relay action. When an
  electrical flow goes into the coils, that current generates a magnetic
  field which turns off. The magnetic strip between the two coils is
  also exposed to the magnetic field, so that when the circuit causes a
  pulse of electrical current through these coils, it then pushes the
  switch mechanism from side to side. The metal strip remains in that
  position until it receives another magnetic pulse, but this time in
  the opposite direction. This action will push the switch back to the
  other terminal. This type of relay remains in the last position it was
  in when the current was removed.




This is another possibility depending on application type:
Case