Involved in cellular response to chemical stress and may contribute to resistance toward antimicrobial natural compounds as well as drugs (Probable). Catalyzes the methylation and detoxification of the P.aeruginosa toxin 2-heptyl-1-hydroxy-4(1H)-quinolinone (HQNO) to 2-heptyl-1-methoxy-4(1H)-quinolinone (HMOQ) (PubMed:33064871). Can also methylate 3-bromo-2-heptyl-1-hydroxy-4(1H)-quinolinone, and shows much lower activity with 1-hydroxyquinolin-4(1H)-one, quercetin, 4-hydroxyquinolin-2(1H)-one (DHQ) and 4-hydroxyisoquinolin-1(2H)-one (PubMed:33064871). In addition, N-methylates and abolishes the mycobactericidal activity of 3-methyl-1-oxo-2-[3-oxo-3-(pyrrolidin-1-yl)propyl]-1,5-dihydrobenzo[4,5]imidazo[1,2-a]pyridine-4-carbonitrile (compound 14), an inhibitor of DprE1 (PubMed:27432954). Also methylates and reduces the inhibitory effect of TPSA (2-[5-(2-{[4-(2-thienyl)-2-pyrimidinyl]sulfanyl}acetyl)-2-thienyl]acetic acid), an inhibitor of GlmU acetyltransferase (PubMed:31380295). 2-heptyl-1-hydroxy-4(1H)-quinolinone + S-adenosyl-L-methionine = 2-heptyl-1-methoxy-4(1H)-quinolinone + H(+) + S-adenosyl-L-homocysteine 3-bromo-2-heptyl-1-hydroxy-4(1H)-quinolinone + S-adenosyl-L-methionine = 3-bromo-2-heptyl-1-methoxy-4(1H)-quinolinone + H(+) + S-adenosyl-L-homocysteine 3-methyl-1-oxo-2-[3-oxo-3-(pyrrolidin-1-yl)propyl]-1,5-dihydrobenzo[4,5]imidazo[1,2-a]pyridine-4-carbonitrile + S-adenosyl-L-methionine = 3,5-dimethyl-1-oxo-2-[3-oxo-3-(pyrrolidin-1-yl)propyl]-1,5-dihydrobenzo[4,5]imidazo[1,2-a]pyridine-4-carbonitrile + H(+) + S-adenosyl-L-homocysteine kcat is 0.8 sec(-1) with HQNO as substrate (PubMed:33064871). kcat is 0.074 min(-1) with compound 14 as substrate (PubMed:27432954). Monomer. Repressed by the transcriptional repressor Rv2887 (PubMed:27432954). Induced by salicylate, during iron deprivation (at RNA level), by anaerobiosis and by superoxide generating naphthoquinones such as menadione and plumbagin and by pro-oxidant phenoxyisobutyrates (fibrates) such as gemfibrozil (at protein level). Part of the Rv0560c-Rv0559c operon. Operon induction is slow but is maintained for at least 2 weeks in aerobic culture in the presence of salicylate (PubMed:15528667, PubMed:15644891, PubMed:16175359, PubMed:22485172). Deletion of the gene has no effect on growth in medium containing salicylate or on intra-macrophage replication (PubMed:28061949). Deletion does not affect sensitivity to plumbagin, menadione, nigericin, PAS or CCCP (PubMed:28061949). Is dispensable under in vitro conditions in both axenic and macrophage culture. Belongs to the methyltransferase superfamily. It is uncertain whether Met-1 or Met-17 is the initiator.