Whichever insurance policy was in effect *at the time of the accident* would be the one that has to pay, unless the terms of that policy specifically had an exclusion that applies to this circumstance. If an insurer which appears to be responsible will not pay, you option is to sue the insurer in court for breach of contract (an insurance policy is a contract, after all) and show that as per the terms of the contract and the facts (e.g. the timing of the accident), the insurer has to pay. If you are not sure which insurance policy was in effect, you can sue both insurers and let them try to prove that it wasn't them.