a situation in which you are successful, but which could also have ended badly
a situation in which you are successful, but which could also have ended badly
Phew! That was a near thing! It could have been a disaster.
Definiciones del Oxford Advanced Learner's Dictionary, 9.ª edición