Expresses that something nearly happened but ultimately did not — a narrow escape or a close call. It means 'was about to ~' or 'almost ~ (but didn't)'. It is often paired with もう少しで or 危うく to stress how close the situation was.
(もう少しで/危うく) + [Verb (dictionary)] + ところだった
もう少しで電車に乗り遅れるところだった。
Mou sukoshi de densha ni noriokureru tokoro datta.
I almost missed the train.
ところだった shows the missing nearly happened but was avoided.
危うく大事なファイルを消してしまうところだった。
Ayauku daiji na fairu o keshite shimau tokoro datta.
I nearly deleted an important file.
危うく + ところだった emphasizes the narrowly avoided mistake.
あと一歩で落ちるところだったよ。
Ato ippo de ochiru tokoro datta yo.
One more step and I would have fallen.
ところだった conveys the fall was imminent but did not occur.
• Use the dictionary (non-past) form before ところだった — the event did NOT actually happen. • Commonly reinforced by もう少しで, あと少しで, or 危うく. • Expresses relief about a near miss (often bad outcomes narrowly avoided).
The JLPT rarely asks whether you recognise a pattern — it asks which of several similar patterns fits. These are the ones ~ところだった is tested against.
~たところだ (past verb + ところだ) means 'just finished doing', a completed action, whereas dictionary + ところだった means something almost happened but did not.
そうだった describes how something looked/seemed, while ところだった specifically states a near-miss that was avoided.
Study Japanese grammar on LenGaki

Get the Android app
The app adds offline study, home-screen widgets, stroke-order tracing, speaking practice with pronunciation scoring, and an AI tutor that answers questions in context — none of which fits in a browser tab.