A close call

Meaning: A situation in which something bad almost happened.

Example: That was a close call; the car nearly hit the cyclist.