Let M be a locally irreducible Riemannian manifold such that (almost)
any geodesic be contained in a compact immersed flat of dimension at l
east 2. The main result in this article implies that M is a locally sy
mmetric space of the compact type. Therefore, our result gives a chara
cterization of locally symmetric spaces of the compact type and higher
rank in terms of flats.