  We study the modular transformation properties of Euclidean solutions of 3D
gravity whose asymptotic geometry has the topology of a torus. These solutions
represent saddle points of the grand canonical partition function with an
important example being the BTZ black hole, and their properties under modular
transformations are inherited from the boundary conformal field theory encoding
the asymptotic dynamics. Within the Chern Simons formulation, classical
solutions are characterised by specific holonomies describing the wrapping of
the gauge field around cycles of the torus. We find that provided these
holonomies transform in an appropriate manner, there exists an associated
modular invariant grand canonical partition function and that the spectrum of
saddle points naturally includes a thermal bath in $AdS_3$ as discussed by
Maldacena and Strominger. Indeed, certain modular transformations can naturally
be described within classical bulk dynamics as mapping between different
foliations with a "time" coordinate along different cycles of the asymptotic
torus.
