  We call a finitely generated group lacunary hyperbolic if one of its
asymptotic cones is an R-tree. We characterize lacunary hyperbolic groups as
direct limits of Gromov hyperbolic groups satisfying certain restrictions on
the hyperbolicity constants and injectivity radii. Using central extensions of
lacunary hyperbolic groups, we solve a problem of Gromov by constructing a
group whose asymptotic cone C has countable but non-trivial fundamental group
(in fact C is homeomorphic to the direct product of a tree and a circle, so
\pi_1(C)=Z). We show that the class of lacunary hyperbolic groups contains
elementary amenable groups, groups with all proper subgroups cyclic, and
torsion groups. This allows us to solve two problems of Drutu and Sapir, and a
problem of Kleiner about groups with cut-points in their asymptotic cones. We
also construct a finitely generated group whose divergence function is not
linear but is arbitrarily close to being linear. This answers a question of
Behrstock.
