Anaerobic digestion is an established technology to treat different kinds of wastes and to simultaneously produce biogas, a mixture of methane and carbon dioxide, which is a useful and renewable energy source. In this work, the anaerobic digestion of buffalo manure is studied. The latter is a low cost substrate rich in carbohydrates, especially suitable to produce biogas in anaerobic digesters. The process is performed both under mesophilic (37 degrees C) and thermophilic (55 degrees C) conditions with pH spanning from 6.0 to 8.7. Many different samples, deriving both from lactating and non-lactating buffaloes, are used. Under mesophilic conditions, our results are essentially in line with literature, and the highest methane concentration in the biogas (even above 65 %) is obtained with pH = 7.0. Conversely, under thermophilic conditions, we observed that also with pH > 8.0, the anaerobic process runs efficiently. In particular, methane concentration in the biogas reaches values around 70 %, with production rates almost twice those obtained at 37 degrees C. This experimental observation is particularly interesting for those wastes showing a natural basic pH, as the buffalo manure at hand; in these cases, in fact, the digestion process can start without any manipulation of the pH.