The porB locus codes for the major outer membrane protein of Neisseria gonorrhoeae. Alleles of this locus have been assigned to two homology groups based on close sequence and immunological relationships and are designated as either PIA or PIB. Several population parameters were estimated and compared among these two groups using a data set of 22 PIA sequences and 91 PIB sequences obtained from diverse geographic localities and from time periods spanning approximately 50 years. Recombination appears to be extensive in the porB gene. While the recombination rates are similar for the PIA and PIB sequences, the relative contribution of recombination to genetic diversity is higher for the PIA sequences. Alleles belonging to the PIB group show greater genetic diversity than do those in the PIA group. Although phylogenetic analysis did not reveal temporal or geographic clustering of sequences, estimates of gene flow and the fixation index suggested that PIB sequences exhibit population substructure based on geographic locality. Selection acts in these homology groups in a different way. While positive Darwinian selection is the dominant force driving the evolution of the PIA sequences, purifying selection operates also on the PIB sequences. These differences may be attributable to the greater propensity of PIA strains, as compared with PIB strains, to cause disseminated gonococcal infection, which would expose the former to intense selection pressure from the host immune system. The molecular evolution of Neisseria gonorrhoeae seems to be driven by the simultaneous action of selection and recombination, but under different rates and selection pressures for the PIA and PIB homology groups.