- The negative effective magnetic-pressure instability operates on scales encompassing many turbulent eddies, which correspond to convection cells in the Sun. This instability is discussed here in connection with the formation of active regions near the surface layers of the Sun. This instability is related to the negative contribution of turbulence to the mean magnetic pressure that causes the formation of large-scale magnetic structures. For an isothermal layer, direct numerical simulations and mean-field simulations of this phenomenon are shown to agree in many details, for example the onset of the instability occurs at the same depth. This depth increases with increasing field strength, such that the growth rate of this instability is independent of the field strength, provided the magnetic structures are fully contained within the domain. A linear stability analysis is shown to support this finding. The instability also leads to a redistribution of turbulent intensity and gas pressure that could provide direct observational signatures.