Granular material is vibro-fluidized in N = 2 and N = 3 connected compartments, respectively. For sufficiently strong shaking the granular gas is equi-partitioned, but if the shaking intensity is lowered, the gas clusters in one compartment. The phase transition towards the clustered state is of 2nd order for N = 2 and of 1st order for N = 3. In particular, the latter is hysteretic. The experimental findings are accounted for within a dynamical model that has exactly the above properties.