last-minute
Just before it is too lateJust before it is too late; in the nick of time.
US/lˌæsmˈɪnət/
Meaning
2 sensesJust before it is too late; in the nick of time.
He's a last-minute replacement. After today, they'd have had to play with the original roster.
just before a deadline; at the last minute
Done or occurring at the latest possible time before an event.