Abstract. Energetic proton transport through self-generated Alfvén waves in impulsive (γ-ray) flares is studied using the method of Monte Carlo simulations. Protons are traced inside a flux tube after they are released from a point source located inside the loop until they hit the boundary of the 1-D simulation box and escape. As they stream from the source towards the boundaries, the particles generate Alfvén waves through the streaming instability. We consider both open and closed field lines. In the closed field line case, the escaping particles precipitate and produce observable secondary emissions; for the open field line, particles precipitate only from one end of the field line, and escape freely to the interplanetary medium from the other end. For a sufficiently large number of accelerated protons per unit area, n0VA/Ωp where n0 is the plasma density, VA the Alfvén speed, and Ωp the proton gyro-frequency, the particle flux from the source produces a turbulent trap that expands at Alfvén speed in both directions from the source. The resulting γ-ray emission from the loop legs consists of a precursor, related to the quick propagation of particles when the trap has not formed yet, and of a delayed brightening in the loop leg closer to the source, related to the opening of the turbulent trap as the self-generated waves reach the solar surface. For impulsive injections lasting L/(2VA), where L is the loop length, the second emission may be suppressed by adiabatic deceleration in the expanding turbulent trap. For open field lines, our model is capable of producing the small ratio of the numbers of interplanetary-to-interacting protons typically observed in impulsive flares, if the proton source is located close to the Sun.