A continuously fed, compartmentalized reactor that reverses its flow in a horizontal manner. This system is developed without the requirement of elaborate gas-solids-separator and feed-distribution systems. Effluent recycling is not required, but mixing is necessary to obtain a sufficient biomass/substrate contact. This process is known as the anaerobic migrating blanket reactor (AMBR). A key to the selection of a granular biomass in the AMBR process, and thus to the reactor performance, is the migration of the blanket through the reactor. A higher rate of migration of flocculent biomass, compared with granular biomass, is responsible for the wash out of less settleable, flocculent biomass. In this way, the formed aggregates are retained in the reactor and grow in size.