We find that moderate cationic selectivity of the general bacterial porin OmpF in sodium and potassium chloride solutions is inversed to anionic selectivity in concentrated solutions of barium, calcium, nickel, and magnesium chlorides. To understand the origin of this phenomenon, we consider several factors, which include the binding of divalent cations, electrostatic and steric exclusion of differently charged and differently sized ions, size-dependent hydrodynamic hindrance, electrokinetic effects, and significant "anionic" diffusion potential for bulk solutions of chlorides of divalent cations. Though all these factors contribute to the measured selectivity of this large channel, the observed selectivity inversion is mostly due to the following two. First, binding divalent cations compensates, or even slightly overcompensates, for the negative charge of the OmpF protein, which is known to be the main cause of cationic selectivity in sodium and potassium chloride solutions. Second, the higher anionic (versus cationic) transport rate expected for bulk solutions of chloride salts of divalent cations is the leading cause of the measured anionic selectivity of the channel. Interestingly, at high concentrations the binding of cations does not show any pronounced specificity within the divalent series because the reversal potentials measured in the series correlate well with the corresponding bulk diffusion potentials. Thus our study shows that, in contrast to the highly selective channels of neurophysiology that employ mostly the exclusion mechanism, quite different factors account for the selectivity of large channels. The elucidation of these factors is essential for understanding large channel selectivity and its regulation in vivo.