Recent attempts to understand the origin of social fragmentation on the basis of spin models include terms accounting for two social phenomena: homophily—the tendency for people with similar opinions to establish positive relations—and social balance—the tendency for people to establish balanced triadic relations. Spins represent attribute vectors that encode G different opinions of individuals whose social interactions can be positive or negative. Here we present a co-evolutionary Hamiltonian model of societies where people minimize their individual social stresses. We show that societies always reach stationary, balanced, and fragmented states, if—in addition to homophily— individuals take into account a significant fraction, q, of their triadic relations. Above a critical value, qc , balanced and fragmented states exist for any number of opinions.