なり
nari
as soon as; the moment
[As soon as / The moment]
Connection: Verb dictionary form + なり
Usage: Indicates that immediately after one action, another action follows without any pause. Emphasizes the immediacy and unexpectedness of the second action. The subject of both clauses is usually the same person.
Examples:
彼は家に帰るなり、ソファに倒れ込んだ。(The moment he got home, he collapsed onto the sofa.)
電話を受けるなり、彼女は泣き出した。(As soon as she answered the phone, she burst into tears.)
先生は教室に入るなり、テストを始めた。(The moment the teacher entered the classroom, they started the test.)