expression
in case of emergency; when the unexpected happens; for a rainy day
Refers to a time of unforeseen trouble or urgent need; often used when talking about preparation or savings.
まさかの時のために貯金しておきなさい。
Save money for a rainy day.
まさかの時はこの番号に電話してください。
In case of emergency, please call this number.