Spatial variation in habitat riskiness has a major influence on the predator–prey space race. However, the outcome of this race can be modulated if prey shares enemies with fellow prey (i.e., another prey species). Sharing of natural enemies may result in apparent competition, and its implications for prey space use remain poorly studied. Our objective was to test how prey species spend time among habitats that differ in riskiness, and how shared predation modulates the space use by prey species. We studied a one‐predator, two‐prey system in a coastal dune landscape in the Netherlands with the European hare (Lepus europaeus) and European rabbit (Oryctolagus cuniculus) as sympatric prey species and red fox (Vulpes vulpes) as their main predator. The fine‐scale space use by each species was quantified using camera traps. We quantified residence time as an index of space use. Hares and rabbits spent time differently among habitats that differ in riskiness. Space use by predators and habitat riskiness affected space use by hares more strongly than space use by rabbits. Residence time of hare was shorter in habitats in which the predator was efficient in searching or capturing prey species. However, hares spent more time in edge habitat when foxes were present, even though foxes are considered ambush predators. Shared predation affected the predator–prey space race for hares positively, and more strongly than the predator–prey space race for rabbits, which were not affected. Shared predation reversed the predator–prey space race between foxes and hares, whereas shared predation possibly also released a negative association and promoted a positive association between our two sympatric prey species. Habitat riskiness, species presence, and prey species’ escape mode and foraging mode (i.e., central‐place vs. noncentral‐place forager) affected the prey space race under shared predation.