Mires forming an ecohydrological gradient from nutrient-rich, groundwater-fed mesotrophic and oligotrophic fens to a nutrient-poor ombrotrophic bog were studied by comparing potential methane (CH4) production and methanogenic microbial communities. Methane production was measured from different depths of anoxic peat and methanogen communities were detected by detailed restriction fragment length polymorphism (RFLP) analysis of clone libraries, sequencing and phylogenetic analysis. Potential CH4 production changed along the ecohydrological gradient with the fens displaying much higher production than the ombrotrophic bog. Methanogen diversity also decreased along the gradient. The two fens had very similar diversity of methanogenic methyl-coenzyme M reductase gene (mcrA), but in the upper layer of the bog the methanogen diversity was strikingly lower, and only one type of mcrA sequence was retrieved. It was related to the Fen cluster, a group of novel methanogenic sequences found earlier in Finnish mires. Bacterial 16S rDNA sequences from the fens fell into at least nine phyla, but only four phyla were retrieved from the bog. The most common bacterial groups were Deltaproteobacteria, Verrucomicrobia and Acidobacteria.