  Using magnetographic data provided by the Helioseismic and Magnetic Imager on
board the Solar Dynamics Observatory, we analyzed the structure of magnetic
fields and vertical electric currents in six active regions (ARs) with
different level of flare activity. We found that electric currents are well
balanced over the entire AR: for all of them the current imbalance is below
0.1%, which means that any current system is closed within an AR. Decomposition
of the transverse magnetic field vector into two components allowed us to
reveal the existence of large-scale vortex structures of the azimuthal magnetic
field component around main sunspots of ARs. In each AR, we found a large-scale
electric current system occupying a vast area of an AR, which we call
distributed electric current. For ARs obeying the Hale polarity law and the
hemispheric helicity sign rule, the distributed current is directed upward in
the leading part of an AR and it appears to be closing back to the photosphere
in the following part of an AR through the corona and chromosphere. Our
analysis of the time variations of the magnitude of the distributed electric
currents showed that low-flaring ARs exhibit small variations of the
distributed currents in the range of $\pm 20 \times 10^{12}$ A, whereas the
highly flaring ARs exhibited significant slow variations of the distributed
currents in the range of $30-95 \times 10^{12}$ A. Intervals of the enhanced
flaring appear to be co-temporal with smooth enhancements of the distributed
electric current.
