Although xylose and lactose, two major carbohydrates existing in lignocellulosic and dairy wastes, are produced in huge amounts every year, their potentials in dark fermentative H-2 production were not investigated sufficiently and the optimum fermentation pH is still unclear particularly at thermophilic temperatures. Therefore, in this study, the influence of pH on fermentative H-2 production from xylose and lactose was investigated using a mixed culture compost inoculum. Completely mixed thermophilic (55 degrees C) bioreactors were operated in sequential batch mode at constant pH levels between 4.7 and 6.5. The highest H-2 yield in fermentation of xylose was achieved as 1.70 mol/mol at pH 5.0. The H-2 yield was strongly affected by the level of pH and butyrate fermentation. The unsatisfactory yields were associated with lactate fermentation at pH 4.7 and without pH control and with ethanol formation at pH 6.0. The optimal pH for stable H-2 yield from lactose was suggested to be 5.3 considering the molar yields increased to a maximum of 3.45 mol H-2/mol hexose sugar. Another indication of efficient H-2 production at pH 5.3 was the metabolic shift from ethanol to butyrate fermentation. Acetate fermentation yielding H-2 below stoichiometric ratios especially in low H-2 yielding runs revealed that some portion of the H-2 was consumed by acetogenic bacteria. (C) 2007 International Association for Hydrogen Energy. Published by Elsevier Ltd. All rights reserved.