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.