expression
thereupon; just then; at that moment
Used after the plain past or non-past form of a verb to indicate that something happened right at that time, often with a nuance of timing or opportunity. Similar to ~たところへ or ~ているところへ.
出かけようとしたところへ電話が鳴った。
Just as I was about to leave, the phone rang.
困っているところへ友達が助けに来てくれた。
Just when I was in trouble, a friend came to help.