The informal and very common expression salvarse por los pelos, or also salvarse por un pelo, currently means to survive or escape alive from an imminent danger in the nick of time "by a stroke of luck," or to put it another way "por los pelos." In English, these meaning is conveyed by the expressions by the skin of one's teeth or by a hair's breadth.