2-methyl-5-nitro-imidazolyl compounds with the general formula I, II or III:wherein one of the groups R1, R2, R3, R4, R5 is selected from an aldehyde and a 5- or 6-membered aromatic heterocylic group having 1 to 3 heteroatoms selected from N, O, S wherein the aromatic heterocylic group is optionally substituted and is optionally fused with a benzene ring that is optionally substituted and each of the other groups R1, R2, R3, R4, R5 is independently selected from hydrogen, alkyl, alkenyl, alkoxy, amino, alkylamino, dialkylamino, aryl, aralkyl, carboxyl, carboxylic ester, cyano, amido, bromo, chloro, fluoro, alkylamido and heterocyclic optionally substituted R6 is selected from - SO2-R16, -(CH2)n-R17 R16 is a heterocylic group optionally substituted R17 is a heterocylic group optionally substituted n is selected from 1 to 5 R7 is selected from C2-C10 alkyl, aryl optionally substituted, heterocyclic optionally substituted, alkenyl and C2-C4 hydroxyalkyl R8, R9, R10, R11, R12, R13, R14, R15 are each independently selected from hydrogen and alkyl the optionally substituted aryl, heterocyclic, aromatic heterocyclic groups and benzene rings are optionally substituted with one or more groups independently selected from alkyl, alkenyl, alkoxy, amino, alkylamino, dialkylamino, carboxyl, carboxylic ester, cyano, amido, bromo, chloro, fluoro and alkylamido. These compounds are used as antiparasitic and antibacterial agents.