The range of problems that geotechnical engineers must face is increasing in complexity and scope. Often, complexity arises from the interaction between the soil and the environment – the topic of this lecture. To deal with this type of problem, the classical soil mechanics formulation is progressively generalised in order to incorporate the effects of new phenomena and new variables on soil behaviour. Recent advances in unsaturated soil mechanics are presented first: it is shown that they provide a consistent framework for understanding the engineering behaviour of unsaturated soils, and the effects of suction and moisture changes. Building on those developments, soil behaviour is further explored by considering thermal effects for two opposite cases: high temperatures, associated with the problem of storage and disposal of high-level radioactive waste; and low temperatures in problems of freezing ground. Finally, the lecture examines some issues related to chemical effects on soils and rocks, focusing in part on the subject of tunnelling in sulphate-bearing rocks. In each case new environmental variables are identified, enhanced theoretical formulations are established, and new or extended constitutive laws are presented. Particular emphasis is placed on mechanical constitutive equations, as they are especially important in geotechnical engineering. The lecture includes summary accounts of a number of case histories that illustrate the relevance and implications of the developments described for geotechnical engineering practice.