Saved by the skin of your teeth
A blend of two biblical phrases from the Book of Job. "By the skin of my teeth" (Job 19:20) describes the narrowest possible escape, while "saved" adds the element of rescue. Together they emphasize surviving a dangerous situation with virtually no margin — teeth, of course, having no skin at all.