In 1969, Hirsch posed the following problem: given a diffeomorphism f:N → N and a compact invariant hyperbolic set Λ of f, describe the topology of Λ and the dynamics of f restricted to Λ. We solve the problem where Λ=M^3 is a closed 3-manifold: if M^3 is orientable, then it is a connected sum of tori and handles; otherwise it is a connected sum of tori and handles quotiented by involutions.