We define and give explicit construction of the universal tree-graded space with a given collection of pieces. We apply that to proving uniqueness of asymptotic cones of relatively hyperbolic groups whose peripheral subgroups have unique asymptotic cones. Modulo the Continuum Hypothesis, we show that if an asymptotic cone of a geodesic metric space is homogeneous and has cut points, then it is the universal tree-graded space with pieces - maximal connected subsets without their own cut points. Thus it is completely determined by its collection of pieces.