Chitosan is a cationic polyelectrolyte obtained after N-deacetylation of chitin by alkaline treatment. The adsorption of chitosan and the interaction between chitosan layers have been investigated using a surface force technique. Negatively charged mica surfaces were immersed in a 0.01 wt % acetic acid solution containing 0.01 wt % chitosan. The adsorption of chitosan results in a flat adsorbed layer and a reversal of the sign of the surface charge. The adsorption is essentially irreversible with respect to subsequent dilution. After dilution, the pH dependence of the forces acting between the adsorbed chitosan layers was investigated. The chitosan-mica system is uncharged around pH 6.2 (the pKa of chitosan is around 6.5) At this pH there is a weak attractive interaction between the chitosan-coated surfaces. The minimum in the force vs distance curve is located at a separation of about 20-25 Å. A steric repulsion is observed at smaller separations. At lower and higher pH values the long-range interaction is dominated by a repulsive double-layer force originating from charges on chitosan and on the mica surface, respectively. The information obtained from surface force measurements allows us to suggest a structure of the irreversibly adsorbed layer at various pH values. The pH dependence of the layer structure is rationalized in terms of changes in segment-segment and segment-surface interactions.