wait until the last minute
The phrase "the last minute" is a common way of describing doing something just before the deadline. Of course, it doesn't literally mean the last 1 minute before the deadline. In the case of buying an airplane ticket, "the last minute" might mean 1 week before you leave.
If you really want to emphasize how close to the deadline you are, use "very" before "last minute":
I waited until the very last minute to turn it in.
Follow PhraseMix