〜なり (as soon as)
the moment (and then, unexpectedly)
Verb dictionary form + なり
Sign up free to review this point on a spaced schedule.
なり after a dictionary-form verb means "the moment", and the second action is usually unexpected or abrupt: 彼女は私の顔を見るなり、泣き出した, "the moment she saw my face, she burst into tears".
Both actions have the same subject, and it's a third person. You don't use it about yourself, or for plans and requests.
It's close to や否や and が早いか. What makes なり distinct is the same subject and the sense of surprise at what they did next.
Don't confuse it with なりに (N2), "in one's own way", or with 〜なり〜なり (N1), "either … or". And the た-form + なり is a different pattern again: 出かけたなり帰ってこない, "went out and never came back".
Examples
彼は家に帰るなり、部屋に閉じこもった。
The moment he got home, he shut himself in his room.
彼女は私の顔を見るなり、泣き出した。
The moment she saw my face, she burst into tears.
父は電話に出るなり、怒鳴り始めた。
The moment my father picked up the phone, he started shouting.
息子は座るなり、「お腹すいた」と言った。
The moment my son sat down, he said "I'm hungry".
彼は一口食べるなり、顔をしかめた。
He grimaced as soon as he took a bite.