expression
if things go wrong; if the worst happens
A set conditional phrase used to express a hypothetical worst-case scenario. Often implies a serious or irreversible outcome.
まかり間違えば大事故になっていたかもしれない。
If things had gone wrong, it could have been a major accident.
まかり間違えば命を落とすところだった。
If the worst had happened, I could have lost my life.
The prefix まかり (罷り) is an old humble/honorific element that adds emphasis, and 間違えば is the conditional form of 間違う (to be mistaken). The phrase literally means 'if one should err', but has become a fixed expression for a worst-case scenario.