The genetic basis of infection determines the dynamics of host–parasite coevolution and associated phenomena such as local adaptation and the evolution of sex and recombination. Here, we present parasite resistance as a two–step process in which hosts must first detect parasites and then eradicate them; failure at either step results in infection. The model incorporates –matching–allele– (MA) genetics for detection and –gene–for–gene– (GFG) genetics for eradication. We found that the oscillatory dynamics were similar to pure GFG genetics when the cost of ‘virulence’ alleles was low, but resembled pure MA genetics when the cost was high. The magnitude of the cost that switched the dynamics from GFG dominated to MA dominated depended on the genetic architecture of defence (i.e. the number of GFG and MA loci).