A 46.8-kb plasmid, pBM309, of Bacillus megaterium determines the production of a bacteriocin, megacin A, and confers immunity against this antibiotic on the host cells. The megacin A (megA) and megacin A-immunity (megAim) genes were mapped on the physical map of pBM309 by using its deletion derivatives. Both genes were isolated as a 10.6-kb PstI fragment and cloned in Bacillus subtilis vector plasmid pBD9 for expression in B. megaterium.