© 2014 Ruffell et al. Forest edges can strongly affect avian nest success by altering nest predation rates, but this relationship is inconsistent and context dependent. There is a need for researchers to improve the predictability of edge effects on nest predation rates by examining the mechanisms driving their occurrence and variability. In this study, we examined how the capture rates of ship rats, an invasive nest predator responsible for avian declines globally, varied with distance from the forest edge within forest fragments in a pastoral landscape in New Zealand. We hypothesised that forest edges would affect capture rates by altering vegetation structure within fragments, and that the strength of edge effects would depend on whether fragments were grazed by livestock. We measured vegetation structure and rat capture rates at 488 locations ranging from 0-212 m from the forest edge in 15 forest fragments, seven of which were grazed. Contrary to the vast majority of previous studies of edge effects on nest predation, ship rat capture rates increased with increasing distance from the forest edge. For grazed fragments, capture rates were estimated to be 78% lower at the forest edge than 118 m into the forest interior (the farthest distance for grazed fragments). This relationship was similar for ungrazed fragments, with capture rates estimated to be 51% lower at the forest edge than 118 m into the forest interior. A subsequent path analysis suggested that these 'reverse' edge effects were largely or entirely mediated by changes in vegetation structure, implying that edge effects on ship rats can be predicted from the response of vegetation structure to forest edges. We suggest the occurrence, strength, and direction of edge effects on nest predation rates may depend on edge-driven changes in local habitat when the dominant predator is primarily restricted to forest patches.