adverb
just when; just as; at the very moment when; on the point of
Used when something happens right at the moment someone is about to do something, often with a nuance of interruption or coincidence. Typically follows a verb in the volitional or dictionary form + とする/とした.
出かけようとした矢先に、電話が鳴った。
Just as I was about to go out, the phone rang.
彼に話しかけようとした矢先に、彼は立ち去った。
Just when I was about to speak to him, he left.