We present a first-principles theoretical study of the relative formation energies and the electronic states of the InP(111)A surface. The energetically most favorable reconstruction has a T4-site P trimer on the surface, which exhibits a metallic band character and does not obey the electron counting rule (ECR). The stability of this structure is attributed to the balance between the ECR and the minimization of local distortion in the surface region. Our results for the simulated scanning tunneling microscopy images confirm the experimental interpretation of bright protrusions on the P trimers.