The transition between the L3 and L4 larval stages of the nematode filarial parasites such as Dirofilaria immitis occurs after introduction into the animal host and is mediated by at least one metalloprotease and/or cysteine protease unique to the L3 or L4 larval stage. Methods to prevent and treat filarial infection are provided by vaccines comprised of the immunogenic determinants of the characteristic L3 or L4 proteases and by administration of inhibitors of these proteases.