The invention relates to a method and a device for producing biogas in a combined fermenter, in the first section (2) of which organic material is produced by phototrophic microorganisms (1) using atmospheric carbon dioxide and oxygen, said organic material being used to produce biomethane by means of methanogens (5) in a second section (4). The fermenter is operated in multiple modes and using special gassing and degassing methods such that an optimal gas supply corresponding to the requirements of the respective microorganisms and preferably also the absorption or the use of atmospheric carbon dioxide is ensured.