A narrow escape

Meaning: A situation in which someone narrowly avoids danger or trouble.

Example: The passengers had a narrow escape when the vehicle lost control.