In this article we study the relation between the urban heat island (UHI) in the urban canyon and street geometry, in particular the aspect ratio. Model results and observations show that two counteracting processes govern the relation between the nocturnal UHI and the building aspect ratio: i.e. trapping of long-wave radiation and shadowing effects. In general, trapping of long-wave radiation supports the UHI, whereas shadowing effects reduce the UHI. The net effect depends on the UHI definition and the amount of available short-wave radiation penetrating the canyon. In summer, autumn and spring the shadowing effects can already reduce the UHI starting at an aspect ratio between 0.5 and 1. The analysis is carried out using several methods. Firstly, the single-column model version of the Weather Research and Forecasting (WRF) model is used extensively. Two separate runs, one rural and one urban, are used to estimate the UHI. Secondly, the urban canyon temperature at the 2 m level is introduced, which allows for direct comparison between modelled and observed air temperatures within the urban canyon. Finally, the model is evaluated for all four seasons. The results of this research provide important insights for urban planning on how to use the aspect ratio to mitigate the UHI in the urban canyon.