Globular star clusters are compact and massive stellar systems old enough to have witnessed the entire history of our Galaxy, the Milky Way. Although recent results suggest that their formation may have been more complex than previously thought, they still are the best approximation to a stellar population formed over a relatively short time scale (less than 1 Gyr) and with virtually no dispersion in the iron content. Indeed, only one cluster-like system (omega Centauri) in the Galactic halo is known to have multiple stellar populations with a significant spread in iron abundance and age4,5. Similar findings in the Galactic bulge have been hampered by the obscuration arising from thick and varying layers of interstellar dust. Here we report that Terzan 5, a globular-cluster-like system in the Galactic bulge, has two stellar populations with different iron content and ages. Terzan 5 could be the surviving remnant of one of the primordial building blocks that are thought to merge and form galaxy bulges.