Dimethyl sulfide (DMS) is a key compound in global sulfur and carbon cycles. DMS oxidation products cause cloud nucleation and may affect weather and climate. DMS is generated largely by bacterial catabolism of dimethylsulfoniopropionate (DMSP), a secondary metabolite made by marine algae. We demonstrate that the bacterial gene dddD is required for this process and that its transcription is induced by the DMSP substrate. Cloned dddD from the marine bacterium Marinomonas and from two bacterial strains that associate with higher plants, the N2-fixing symbiont Rhizobium NGR234 and the root-colonizing Burkholderia cepacia AMMD, conferred to Escherichia coli the ability to make DMS from DMSP. The inferred enzymatic mechanism for DMS liberation involves an initial step in which DMSP is modified by addition of acyl coenzyme A, rather than the immediate release of DMS by a DMSP lyase, the previously suggested mechanism.