A three-dimensional numerical simulation of plasma density irregularities in the postsunset equatorial F region ionosphere leading to equatorial spread F (ESF) is described. Simulated satellite passes are compared with CHAMP magnetometer observations. The comparisons imply that magnetic perturbations parallel to the main field are mainly due to diamagnetic currents flowing on the external walls of the plasma depletions. The divergence of the transverse currents generate field-aligned currents flowing poleward (equatorward) on the external edges of the western (eastern) walls of the depletions which are furthermore detectable in the transverse magnetic field components. That the simulation is electrostatic argues against an Alfvénic interpretation of all of the CHAMP magnetic field observations in ESF.