  Many studies have shown that the protection of the host
$\it{Acyrthosiphon~pisum}$ (Hemiptera, Aphididae) against the parasitoid
$\it{Aphidius~ervi}$ (Hymenoptera, Braconidae) is conferred by the interaction
between the secondary endosymbiont $\it{Hamiltonella~defensa}$ and the
bacteriophage $\it{APSE}$ ($\it{Acyrthosiphon~pisum}$ secondary endosymbiont).
This interaction consists of the production of toxins by the endosymbiont's
molecular machinery, which is encoded by the inserted $\it{APSE}$ genes. The
toxins prevent the development of the parasitoid's egg, conferring protection
for the host. However, the effects of this microscopic interaction on
host-parasitoid dynamics are still an open question. We presented a new
mathematical model based on the bacteriophage effect on parasitism resistance.
We identified that the vertical transmission of the bacteriophage and the host
survival after the parasitoid attack are potential drivers of coexistence.
Also, we showed that the vertical transmission of $\it{H.~defensa}$ is
proportional to the time that the protected population became extinct. Our
results showed that the protected and unprotected hosts' survival after the
parasitoid attack is fundamental to understanding the equilibrium of long
host-parasitoid dynamics. Finally, we illustrated our model considering its
parameters based on experiments performed with $\it{A.~pisum}$ biotypes
$\it{Genista~tinctoria}$ and $\it{Medicago~sativa}$.
