Close call

An accident or incident that almost happens but does not happen.

I had a close call this morning when the truck almost hit me.