Abstract. Let G be a ribbon graph, i.e., a connected finite graph G together with a cyclic ordering of the edges around each vertex. By adapting a construction due to Olivier Bernardi, we associate to any pair (v, e) consisting of a vertex v and an edge e adjacent to v a bijection β (v,e) between spanning trees of G and elements of the set Pic g (G) of degree g divisor classes on G, where g is the genus of G in the sense of Baker-Norine. We give a new proof that the map β (v,e) is bijective by explicitly constructing an inverse. Using the natural action of the Picard group Pic 0 (G) on Pic g (G), we show that the Bernardi bijection β (v,e) gives rise to a simply transitive action β v of Pic 0 (G) on the set of spanning trees which does not depend on the choice of e. A plane graph has a natural ribbon structure (coming from the counterclockwise orientation of the plane), and in this case we show that β v is independent of v as well. Thus for plane graphs, the set of spanning trees is naturally a torsor for the Picard group. Conversely, we show that if β v is independent of v then G together with its ribbon structure is planar. We also show that the natural action of Pic 0 (G) on spanning trees of a plane graph is compatible with planar duality.These findings are formally quite similar to results of Holroyd et al. and ChanChurch-Grochow, who used rotor-routing to construct an action r v of Pic 0 (G) on the spanning trees of a ribbon graph G, which they show is independent of v if and only if G is planar. It is therefore natural to ask how the two constructions are related. We prove that β v = r v for all vertices v of G when G is a planar ribbon graph, i.e. the two torsor structures (Bernardi and rotor-routing) on the set of spanning trees coincide. In particular, it follows that the rotor-routing torsor is compatible with planar duality. We conjecture that for every non-planar ribbon graph G, there exists a vertex v with β v = r v .We thank Spencer Backman, Melody Chan, and Dan Margalit for helpful discussions and feedback on an earlier draft. We also thank Chi Ho Yuen for catching a sign error in Theorem 6.1, and the anonymous referees for their extraordinarily careful proofreading and numerous useful suggestions. This work began at the American Insitute of Mathematics workshop "Generalizations of chip firing and the critical group" in July 2013, and we would like to thank AIM as well as the organizers of that conference (L. Levine, J. Martin, D. Perkinson, and J. Propp) for providing a stimulating environment.