expression
almost did; nearly did
Attaches to the -masu stem of a verb to indicate that an action almost happened but did not. Often used when something was narrowly avoided.
転びそうになったが、なんとか踏みとどまった。
I almost fell, but I managed to keep my balance.
大事な書類を捨てそうになった。
I nearly threw away an important document.