On The Brink

very near or close to a bad situation

Examples:

  • The team was on the brink of defeat when they finally made their comeback.
  • The scientist was on the brink of losing his eyesight when his experiment exploded.