We have performed three-dimensional two-fluid (gas–dust) hydrodynamical models of circumstellar discs with embedded protoplanets (3–333 M⊕) and small solid bodies (radii 10 cm to 10 m). We find that high-mass planets (≳ Saturn mass) open sufficiently deep gaps in the gas disc such that the density maximum at the outer edge of the gap can very efficiently trap metre-sized solid bodies. This allows the accumulation of solids at the outer edge of the gap as solids from large radii spiral inwards to the trapping region. This process of accumulation occurs fastest for those bodies that spiral inwards most rapidly, typically metre-sized boulders, whilst smaller and larger objects will not migrate sufficiently rapidly in the discs lifetime to benefit from the process. Around a Jupiter mass planet we find that bound clumps of solid material, as large as several Earth masses, may form, potentially collapsing under self-gravity to form planets or planetesimals. These results are in agreement with Lyra et al., supporting their finding that the formation of a second generation of planetesimals or of terrestrial mass planets may be triggered by the presence of a high-mass planet.