In this paper, we perform molecular dynamics simulations of an interface containing charged functional groups of different valences in contact with 2:1 ionic solution. We take into account both the finite sizes of the ions in solution and the functional groups but we neglect the structural details of the solvent (primitive model). We show that the distribution of ions and the electrostatic properties of the system depend strongly on the valence of the interfacial charged groups. In the case of surfaces containing well-separated charged interfacial groups, we observe counterion binding at these groups induced by electrostatic interactions. A detailed analysis of the potential of mean force between interfacial charged groups and ions reveals significant features not anticipated by present theories of electrolytes near interfaces. Overall, our results show that, in primitive models of the ion-interface interaction, not only the ionic size and valence are important but the size and valence of the interfacial charged groups also have a significant impact. © 2010 American Institute of Physics.