The association between a highly branched polyelectrolyte with ionizable groups, polyethylene imine (PEI), and an anionic surfactant, sodium dodecyl sulfate (SDS), has been investigated at two pH values, using smallangle neutron and light scattering. The scattering data allow us to obtain a detailed picture of the association structures formed. Small-angle neutron scattering (SANS) measurements in solutions containing highly charged PEI at low pH and low SDS concentrations indicate the presence of disklike aggregates. The aggregates change to a more complex three-dimensional structure with increasing surfactant concentration. One pronounced feature in the scattering curves is the presence of a Bragg-like peak at high q-values observed at a surfactant concentration of 4.2 mM and above. This scattering feature is attributed to the formation of a common wellordered PEI/SDS structure, in analogue to what has been reported for other polyelectrolyte-surfactant systems. Precipitation occurred at the charge neutralization point, and X-ray diffraction measurements on the precipitate confirmed the existence of an ordered structure within the PEI/SDS aggregates, which was identified as a lamellar internal organization. Polyethylene imine has a low charge density in alkaline solutions. At pH 10.1 and under conditions where the surfactant was contrast matched, the SANS scattering curves showed only small changes with increasing surfactant concentration. This suggests that the polymer acts as a template onto which the surfactant molecules aggregate. Data from both static light scattering and SANS recorded under conditions where SDS and to a lower degree PEI contribute to the scattering were found to be consistent with a structure of stacked elliptic bilayers. These structures increased in size and became more compact as the surfactant concentration was increased up to the charge neutralization point.