1. Many ectothermic species use behavioural thermoregulation to reduce their exposure to climate change. The buffering effect of behavioural thermoregulation will depend on the time available for an ectotherm to attain a body temperature within the target range, that is, the 'opportunity for thermoregulation'.Behavioural thermoregulation can be further altered by the presence of competitors. Spatiotemporal dynamics in opportunity for thermoregulation and competition intensity should affect variation in ectotherm life history and fitness; however, experimental support for their joint influence is missing.2. I tested this prediction in a mesocosm experiment using larvae of two sympatric amphibians, the alpine newt Ichthyosaura alpestris and the common newt Lissotriton vulgaris. Thermoregulatory opportunities and competition intensities were manipulated by exposing larvae to warmer temperatures and altering densities of con-and heterospecifics. Life-history traits were monitored until metamorphic emergence from the water.3. Thermoregulatory opportunity accelerated differentiation rate and time to metamorphic emergence, while both intra-and interspecific competition affected growth rate and mass at emergence. The impact of competition on survival and injury rates varied between taxa. 4. Thermoregulatory opportunity and competition impacted larval life-history traits in an additive fashion. Suitable conditions for thermoregulation allowed larvae to shorten their developmental period, and thus escape from the aquatic environment earlier than in thermoregulatory challenging environment.Competition was a primary determinant of mass at emergence, which is an important fitness correlate in amphibians. Species-specific survival under competition may contribute to variation in habitat requirements between sympatric taxa. 5. To sum up, predictions on the impact of climate change on ectotherm life histories require information not only about environmental temperatures, but also about species thermoregulatory opportunities and competitive abilities. Thermoregulatory opportunity is an ecologically relevant habitat property not only for basking ectotherms but also for taxa using less conspicuous | 2521