We show that under suitable assumptions, Poincaré recurrences of a dynamical system determine its topology in phase space. Therefore, dynamical systems with the same recurrences are dynamically equivalent. This conclusion can be drawn from a theorem proved in this paper which states that the recurrence matrix determines the topology of closed sets. The theorem states that if a set of points M is mapped onto another set N, such that two points in N are closer than some prescribed fixed distance if and only if the corresponding points in M are closer than some, in general different, prescribed fixed distance, then both sets are homeomorphic, i.e., identical up to a continuous change in the coordinate system. The theorem justifies a range of methods in nonlinear dynamics which are based on recurrence properties.