before one knew it; in the blink of an eye; while looking on in amazement
Describes a situation that unfolds surprisingly quickly, often leaving the speaker or observer stunned or unable to react. The phrase carries a nuance of bewildered amazement at how fast events progressed.
See also: あれよあれよ
Before anyone knew it, he had risen all the way to company president.
あれよあれよという間に、火は家全体に広がった。
In the blink of an eye, the fire spread throughout the entire house.
Kanji spelling using 言う; less common but still encountered.
Derived from the interjection あれよ (expressing surprise or disbelief) repeated for emphasis, combined with という間に ('in the time it takes to say'). The exact origin is uncertain, but it likely emerged from colloquial storytelling to convey rapid, astonishing developments.