The evolution of the nocturnal atmospheric boundary layer at the foothills of a major mountain range is studied, exploring the influence of thermally driven winds. Observations made in Lannemezan (in the foothills of the Pyrenees, about 10 km from the exit of the Aura Valley) during the Boundary‐Layer Late Afternoon and Sunset Turbulence (BLLAST) experimental field campaign are taken together with high‐resolution mesoscale simulations of some selected intensive observation periods. We find that the nocturnal boundary layer features in Lannemezan are different from those reported in flat terrain regions due to the influence of thermally driven winds. Close to sunset, a thermal gradient between the plain and the mountains favours the initiation of mountain–plain circulations, while at the mountain slopes locally generated downslope winds are formed. The organization of the flow in the Aura Valley generates a valley exit jet close to midnight, which propagates through the foothills while its speed and height decrease. As a result, a maximum wind speed of about 5–10 m/s from the southern sector is found in Lannemezan between 50 and 200 m above the ground, depending on the intensity and direction of the mesoscale winds. Turbulence (above and below the jet nose) and the jet features affect the relative importance of the terms of the surface energy balance and the temperature evolution at lower levels. The organization of the flow at lower levels in the Aura Valley and the thermal gradient between the valley and the foothills are the most important factors in the formation and maintenance of the valley exit jet, strongly modulated by the intensity and direction of the mesoscale winds.