High-resolution X-ray diffraction at variable temperatures was used to study the strain state in ZnSe layers of different thicknesses grown on GaAs(001) substrates and of GaN layers deposited on sapphire. In the ZnSe layers, a biaxial compressive strain component due to the lattice mismatch and a biaxial tensile strain due to the different thermal expansion coefficients are superposed which in general can be well modelled. However, the assumptions of the model may be violated for partially relaxed layers. A residual lattice misfit induced strain is present in ZnSe layers as thick as 5.4 mm. On the contrary, the strain state in GaN layers is given by a superposition of biaxial thermally induced strain and hydrostatic strain, presumably induced by impurity incorporation.Introduction Thermally induced strains in thin films are of large significance for both common II±VI and III±N epitaxial layers. High-resolution X-ray diffraction (HRXRD) at variable temperatures provides the unique possibility to study directly the thermal strain in epitaxial layers. This is demonstrated in this work for the example of ZnSe layers of different thicknesses grown on GaAs(001) substrates and for GaN layers deposited on sapphire. The ZnSe/GaAs system is characterized by a lattice mismatch of 0.27% and a mismatch in thermal expansion coefficients (TEC) of 24% (both at room temperature) as well as by relatively low growth temperatures in molecular beam epitaxy (MBE) of about 300 C. On the contrary, GaN layers grown on c-plane sapphire have a similar thermal mismatch of À28% [1], but their lattice mismatch of 14% and their typical growth temperatures in MBE and metalorganic chemical vapour deposition (MOCVD) of 700 to 1100 C are much higher than for ZnSe layers.The relatively low lattice mismatch between ZnSe and GaAs results in a superposition of biaxial strain components due to the misfit of lattice constants and TEC values [2,3]. To study this superposition requires to vary the layer thicknesses or/and the measurement temperature. While often only the out-of-plane lattice parameter is studied [2 to 4], we analyze the in-plane mismatch as well enabling to verify directly the validity of theoretical models. On the contrary, the layer strain correlated with the huge lattice mismatch between GaN and sapphire should be relaxed after a few monolayers. However, GaN is known to often contain a remarkable hydrostatic strain due to impurity incorporation [5,6], which has to be taken into account to describe the strain situation in GaN layers correctly. Also in this case the in-plane lattice parameters have to be determined to separate both effects.