Biofilms are communities of microbial cells that are encased in a self-produced, polymeric matrix and are adherent to a surface. For several species of bacteria, an enhanced ability to form biofilms has been linked with an increased capability to produce exopolymers. To identify exopolymers of Bacillus subtilis that can contribute to biofilm formation, we transferred the genetic determinants that control exopolymer production from a wild, exopolymer-positive strain to a domesticated, exopolymer-negative strain. Mapping these genetic determinants led to the identification of gamma-poly-dl-glutamic acid (gamma-PGA) as an exopolymer that increases biofilm formation, possibly through enhancing cell-surface interactions. Production of gamma-PGA by Bacillus subtilis was known to be dependent on the two-component regulator ComPA; this study highlighted the additional dependence on the DegS-DegU, DegQ and SwrA regulator proteins. The inability of the domestic strain of B. subtilis to produce gamma-PGA was mapped to two base pairs; a single base pair change in the promoter region of degQ and a single base pair insertion in the coding region of swrA. Introduction of alleles of degQ and swrA from the wild strain into the domestic strain was sufficient to allow gamma-PGA production. In addition to controlling gamma-PGA production, ComPA and DegSU were also shown to activate biofilm formation through an as yet undefined pathway. The identification of these regulators as affecting gamma-PGA production and biofilm formation suggests that these processes are regulated by osmolarity, high cell density and phase variation.