What does "saved by the bell" mean — and why is it funny?

informal

Meaning

Rescued from a difficult situation at the very last moment.

Where it comes from

From boxing, where the bell ending a round can rescue a struggling fighter just before he is beaten; an older, spookier story about bells on coffins is almost certainly a myth.

Why it is funny

The mild humor is the lucky timing of it. A bell, of all things — a small, ordinary sound — arrives like a hero in the final second, and the relief is almost comic.

Used in a sentence

"I had no answer ready, but the lunch bell rang — saved by the bell."