〜なり
N1「〜するとすぐに」。直後の予想外の出来事
as soon as ~ (an unexpected action follows)
接続 / Structure
V(辞書形) + なり
例文 / Example
彼は家に帰るなり、自分の部屋に閉じこもってしまった。
As soon as he got home, he shut himself in his room.
ポイント / Note
前件と後件の主語は同一人物。後件は過去の予想外の出来事で、意志・命令は不可
Same subject in both clauses; the second is an unexpected past event, never volitional or imperative.