In the free-energy landscape picture of glassy systems, their slow dynamics is due to a complicated free-energy landscape with many local minima. We show that for a colloidal glassy material multiple paths can be taken through the free-energy landscape. The evolution of the nonergodicity parameter shows two distinct master curves that we identify as gels and glasses. We show that for a range of colloid concentrations, the transition to nonergodicity can occur in either direction (gel or glass), accompanied by "hesitations" between the two. Thus, colloidal gels and glasses are merely global free-energy minima in the same free-energy landscape, and the paths leading to these minima can be complicated. © 2007 The American Physical Society.