narrow escape
A situation in which danger or problems are barely avoided. That guy barely made it over the tracks before the train came. What a narrow escape!
narrow escape
A barely successful flight from or avoidance of danger or trouble, as in He had a narrow escape, since the bullet came within inches of his head. This expression uses narrow in the sense of "barely sufficient." [Late 1500s] For a newer synonym, see close call.
a narrow eˈscape/ˈsqueak
a situation where somebody only just avoids injury, danger or failure: We had a narrow escape on the way here. The wind blew a tree down just in front of us. We could have been killed.