You can find the answer for your question from a Jataka called "Matakabhatta-Jātaka". Herewith I've quoted the section of the Jātaka which may answer your question.
"In times past, brahman," the goat began, "I was a brahman who taught the Vedas like you. I, too, sacrificed a goat as an offering for a Feast for the Dead. Because of killing that single goat, I have had my head cut off 499 times. I laughed aloud when I realized that this is my last birth as an animal to be sacrificed. Today I will be freed from my misery. On the other hand, I cried when I realized that, because of killing me, you, too, may be doomed to lose your head five hundred times. It was out of pity for you that I cried."
"Well, goat," said the brahman, "in that case, I am not going to kill you."
"Brahman!" exclaimed the goat. "Whether or not you kill me, I cannot escape death today."
"Don't worry," the brahman assured the goat. "I will guard you."
"You don't understand," the goat told him. "Your protection is weak. The force of my evil deed is very strong."
The brahman untied the goat and said to his students, "Don't allow anyone to harm this goat." They obediently followed the animal to protect it.
After the goat was freed, it began to graze. It stretched out its neck to reach the leaves on a bush growing near the top of a large rock. At that very instant a lightning bolt hit the rock, breaking off a sharp piece of stone which flew through the air and neatly cut off the goat's head. A crowd of people gathered around the dead goat and began to talk excitedly about the amazing accident.
Quoted from: Matakabhatta-Jātaka (Jātaka, Khuddaka Nikaya, Sutta Pitaka, Tipitaka)
The subject of Kamma is very deep and hard to understand. Only a Tatagatha Samma Samubuddha can understand.
Note: This is how I understood. I may be wrong but not Dhamma.