The statistical mechanics of an anyon gas in a magnetic field is addressed. A harmonic regulator is used to define a proper thermodynamic limit. When the magnetic field is sufficiently strong, only exact N-anyon ground states, where anyons occupy the lowest Landau level, contribute to the equation of state. Particular attention is paid to the interval of definition of the statistical parameter alpha is-an-element-of [-1,0] where a gap exists. Interestingly enough, one finds that at the critical filling nu = -1/alpha where the pressure diverges, the external magnetic field is entirely screened by the flux tubes carried by the anyons.