A theory has been developed for adsorption from solution of weak flexible polyelectrolytes in a gap between two surfaces. The theory is an extension of the self-consistent-field theory of Scheutjens and Fleer for adsorption of uncharged homopolymers. The finite volume of solvent molecules, polyelectrolyte segments, and ions is taken into account using a multi-Stern-layer model. The dielectric constant and the degree of dissociation of polyelectrolyte segments are allowed to vary with position between the surfaces. Results for the potential decay in the electrical double layer are shown. The effect of salt concentration and pH on the adsorption of polyelectrolyte is also studied. With increasing salt concentration more polyelectrolyte chains adsorb and the adsorbed layer becomes more extended. A maximum in the amount of adsorbed polyelectrolyte is found as a function of the counterion concentration. For a polyacid this maximum is at a pH which is 1-1.5 units below pK. Like for uncharged polymers, the interaction between the two surfaces is mainly determined by the adsorbed amount. A low adsorbed amount leads to a deep minimum in the free energy of interaction, due to bridging, at a small separation. A high adsorbed amount leads to a shallow minimum at large surface separation. At smaller separation strong repulsion dominates, due to steric hindrance. If the polyelectrolyte is completely charged, electrostatic repulsion dominates the interaction curve at large separation. As the adsorption depends strongly on salt concentration and pH, the interaction between two surfaces in the presence of an adsorbing polyelectrolyte can in principle be controlled. If the polyelectrolyte does not adsorb, a depletion layer near the surface develops, which becomes thinner with decreasing salt concentration. At small surface separation, when polyelectrolyte has been depleted from between the surfaces, a Donnan equilibrium is established. This results in a stronger attraction than in a situation where electrostatic charges are absent. © 1990, American Chemical Society. All rights reserved.