The effect of habitat structure on interactions between predators and prey may vary spatially. In estuarine salt marshes, heterogeneity in refuge quality derives from spatial variation in vegetation structure and in tidal inundation. We investigated whether predation by blue crabs on periwinkle snails was influenced by distance from the seaward edge of the salt marsh and by characteristics of the primary habitat structure, smooth cordgrass (Spartina alterniflora). Spartina may provide refuge for snails and interfere with foraging by crabs. Furthermore, predation risk should decline with distance from the seaward edge because landward regions require more travel time for crabs during tidal inundation. We investigated these processes using a comparative survey of snails and habitat traits, an experiment that assessed the crab population and measured predation risk, and a size-structured model that estimated encounter rates. Taken together, these approaches indicated that predation risk for snails was lower where Spartina was present and was lower in a landward direction. Furthermore, Spartina architecture and distance from the seaward edge interacted. The strength of the predation gradient between seaward and landward regions of the marsh was greater where Spartina was tall or dense. These predation gradients emerge because vegetation and distance inland decrease encounter rates between crabs and snails. This study suggests that habitat modification, a process not uncommon in salt marshes, may have consequences for interactions among intertidal fauna.