narrow escape

nouns

something achieved (or escaped) by a narrow margin