A hair's breadth; barely (escaped or avoided something) — a very narrow margin.
間一髪で車に轢かれそうになったが、友人が引っ張って助けてくれた。
I was almost run over, but my friend pulled me back at the last moment.
発車寸前に駅に着き、間一髪で電車に乗れた。
I arrived at the station just before departure and barely caught the train.
その工事現場では間一髪で事故を免れた例が何度もあった。
There were multiple instances at that construction site where accidents were narrowly avoided.