In both aerobic phototrophy and chemolithotrophy, oxygen is used as a terminal electron acceptor, whereas under anaerobic conditions inorganic compounds are used instead