A magnetosphere is the area of space near an astronomical object in which charged particles are controlled by that object's magnetic field. Near the surface of the object, the magnetic field lines resemble those of a magnetic dipole. Farther away from the surface, the field lines are significantly distorted by electric currents flowing in the plasma (e.g. in ionosphere or solar wind). When speaking about Earth, magnetosphere is typically used to refer to the outer layer of the ionosphere although some sources consider the ionosphere and magnetosphere to be separate