Hermit crabs have two antipredator tactics: taking refuge in its shell and fleeing. We examined the following two hypotheses using the hermit crab Pagurus filholi: (1) hermit crabs change their preference for shell types that they take refuge in and/or change the timing of fleeing (i.e. the duration of refuge in the shell) when they perceive a predator threat; (2) the type of shell that a hermit crab occupies affects the fleeing tactic of the individual. Under the stimulus of a crushed conspecific, hermit crabs changed neither their preference for shell species nor their refuge duration. On the other hand, under the stimulus of the predatory crab Gaetice depressus, hermit crabs increased their preference for Batillaria cumingi shells, which provide superior protection against predators, and shortened their refuge duration in the shells even when they occupied those effective against predation. Refuge duration was longer in B. cumingi shells than in the more vulnerable shells of Homalopoma sangarense. These results suggest that both antipredator defences (changing shell and timing of fleeing) are induced by the stimulus of a predator, and the timing of fleeing is affected by the shell type occupied.