Just before it is too late (2,3,4,2,4)
I believe the answer is:
in the nick of time
(Other definitions for in the nick of time that I've seen before include "not a moment too soon" , "almost, but not quite, too late" , "at last possible moment" , "at the eleventh hour" , "at the critical moment" .)