きゅうじんのこうをいっきにかく

九仞の功を一簣に虧く

to fail one step short of great success; to fall at the last hurdle

N3Expression
Expression, Godan verb (ku ending)
to fail one step short of great successto fall at the last hurdle