The wake characteristics of a wind turbine for different regimes occurring throughout the diurnal cycle are investigated systematically by means of large-eddy simulation. Idealised diurnal cycle simulations of the atmospheric boundary layer are performed with the geophysical flow solver EULAG over homogeneous and heterogeneous terrain. Under homogeneous conditions, the diurnal cycle significantly impacts the low-level wind shear and atmospheric turbulence. A strong vertical wind shear and veering with height occur in the nocturnal stable boundary layer and in the morning boundary layer, whereas the atmospheric turbulence is much larger in the convective boundary layer and in the evening boundary layer. The increased shear under heterogeneous conditions changes these wind characteristics, counteracting the formation of the night-time Ekman spiral. The convective, stable, evening, and morning regimes of the atmospheric boundary layer over a homogeneous surface as well as the convective and stable regimes over a heterogeneous surface are used to study the flow in a wind-turbine wake. Synchronized turbulent inflow data from the idealized atmospheric boundary-layer simulations with periodic horizontal boundary conditions are applied to the wind-turbine simulations with open streamwise boundary conditions. The resulting wake is strongly influenced by the stability of the atmosphere. In both cases, the flow in the wake recovers more rapidly under convective conditions during the day than under stable conditions at night. The simulated wakes produced for the nighttime situation completely differ between heterogeneous and homogeneous surface conditions. The wake characteristics of the transitional periods are influenced