We use the sixteen-vertex model to describe bidimensional artificial spin ice. We find excellent agreement between vertex densities in 15 differently grown samples and the predictions of the model. Our results demonstrate that the samples are in usual thermal equilibrium away from a critical point separating a disordered and an antiferromagnetic phase in the model. The second-order phase transition that we predict suggests that the spatial arrangement of vertices in near-critical artificial spin ice should be studied in more detail in order to verify whether they show the expected space and time long-range correlations.