The way species use their habitat dictates their intra- and interspecific interactions. We studied the effects of the microhabitat type and slope on the movement behaviour of the Saharan horned viper (Cerastes cerastes) in its natural habitat. This viper occurs in sand dunes and moves mostly by sidewinding. Additionally, we studied the microhabitat preference of desert rodents-the vipers' main prey. We placed the vipers on different natural dune slopes and recorded their behaviour. We found a strong anti-gravitactic response: vipers moved more frequently towards the top of the dune than in any other direction, despite a decrease in stride length with increasing slope. The foraging-related behaviour of the vipers was concentrated in the dune semi-stable areas rather than its stable or shifting sand areas. We measured rodent activity by placing seed trays in the dune allowing the rodents to collect seeds. Rodent activity was the highest in the shifting sands, closely followed by the semi-stable microhabitat. These results suggest the vipers use the semi-stable microhabitat mainly for foraging and may use the shifting sand areas as commuting routes between such areas. This study may be of use for conservation efforts of psammophilic species in desert dunes.