Rescued from a difficulty at the last moment, as in I couldn't put off explaining his absence any longer, but then Bill arrived and I was saved by the bell. This expression alludes to the bell rung at the end of a boxing round, which, if it rings before a knocked-down boxer has been counted out, lets him get up and continue fighting in the next round. Its figurative use dates from the mid-1900s.