expression
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.
あっという間に is a more common and neutral expression for 'in the blink of an eye,' without the nuance of stunned amazement that あれよあれよという間に carries.
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.