Answer:
In simple words, if any country in any scenario lacks the civilian courts, then military courts rulings will take precedence. These courts will be run by the officials and representatives of the armed forces and will act according to the martial laws.
There could be many more situations under which the rulings of court will take precedence, such as serious war situations etc.