- Animal movement between habitat patches is often considered a random process. However, responses to landscape heterogeneity can direct the movement of animals and affect connectivity patterns. Topographical heterogeneity is a major source of habitat heterogeneity, which often directs animal movements and yet is scarcely studied in the context of dispersal. We investigated the mechanisms of response to topography and movement rules, using hilltopping as a behavioural case study. Hilltopping is a mate-searching strategy where males and virgin or multiple-mating females seek a topographical summit on which to mate. Mated females descend from the summits thereafter to search for host plants. We investigated the behavioural rules of hilltopping in males and virgin females of the butterfly Melitaea trivia , and female postmating movements. We released butterflies in different topographical formations, in a landscape that contained no larval host plants. We followed them individually, mapped the flight routes, and analysed them with respect to the surrounding landscape, using a Digital Elevation Model. Males and virgin females initiated hilltopping behaviour only in the absence of other individuals. After an initial orientation phase, butterflies flew towards the maximal inclination available. However, some downward movements interrupted the upward flight. When arriving at or released on a summit, males strongly adhered to it. After copulating, females showed little response to topography. Males and virgin females responded to topographical cues within about 50 m of their location. Our results show that nonrandom movements, such as hilltopping, are based on simple and predictable decision rules. We discuss the relation between hilltopping and dispersal, and the implications for modelling dispersal.