Abstract. We construct a Poincaré section for the horocycle flow on the modular surface SL(2, R)/SL(2, Z), and study the associated first return map, which coincides with a transformation (the BCZ map) defined by Boca-Cobeli-Zaharescu [8]. We classify ergodic invariant measures for this map and prove equidistribution of periodic orbits. As corollaries, we obtain results on the average depth of cusp excursions and on the distribution of gaps for Farey sequences and slopes of lattice vectors.