Bidirectional cross-feeding of carbon and nitrogen in an anaerobic bacterial mutualism between fermentative Escherichia coli (Ec) and phototrophic Rhodopseudomonas palustris (Rp). E. coli ferments glucose into excreted organic acids that R. palustris Nx consumes (acetate, lactate, and succinate) and other products that R. palustris Nx does not consume (formate [For] and ethanol [EtOH]). In return, R. palustris Nx constitutively fixes N2 gas and excretes NH4+, supplying E. coli with essential nitrogen. R. palustris Nx grows photoheterotrophically, wherein organic compounds are used for carbon and electrons and light is used for energy.