Stably stratified flows over a two-dimensional hill are investigated in a channel of finite depth using a three-dimensional direct numerical simulation (DNS). The present study follows on to our previous two-dimensional DNS studies of stably stratified flows over a hill in a channel of finite depth and provides a more realistic simulation of atmospheric flows than our previous studies. A hill with a constant cross-section in the spanwise (y) direction is placed in a 3-D computational domain. As in the previous 2-D simulations, to avoid the effect of the ground boundary layer that develops upstream of the hill, no-slip conditions are imposed only on the hill surface and the surface downstream of the hill; slip conditions are imposed on the surface upstream of the hill. The simulated 3-D flows are discussed by comparing them to the simulated 2-D flows with a focus on the effect of the stable stratification on the non-periodic separation and reattachment of the flow behind the hill. In neutral (K = 0, where K is a non-dimensional stability parameter) and weakly stable (K = 0.8) conditions, 3-D flows over a hill differ clearly from 2-D flows over a hill mainly because of the three-dimensionality of the flow, that is the development of a spanwise flow component in the 3-D flows. In highly stable conditions (K = 1, 1.3), long-wavelength lee waves develop downstream of the hill in both 2-D and 3-D flows, and the behaviors of the 2-D and 3-D flows are similar in the vicinity of the hill. In other words, the spanwise component of the 3-D flows is strongly suppressed in highly stable conditions, and the flow in the vicinity of the hill becomes approximately two-dimensional in the x and z directions.