The current article aims at investigating the effect of a periodic tangential magnetic field on the stability of a horizontal flat sheet. The media were considered porous, the three viscous-fluid layers were initially streaming with uniform velocities, and the magnetic field admitted the presence of free-surface currents. Furthermore, the transfer of mass and heat phenomenon was taken into account. The analysis, in this paper, was followed by the viscous potential theory. Moreover, the stability of the boundary-value problem resulted in coupled secondorder linear differential equations with damping and complex coefficients. In regard to the uniform and periodic magnetic field, the standard normal mode approach was applied to deduce a general dispersion relation and judge the stability criteria. In addition, several unfamiliar cases were reported, according to appropriate data choices. The stability conditions were theoretically analyzed, and the influences of the various parameters in the stability profile were identified through a set of diagrams. In accordance wth the oscillating field, the coupled dispersion equations were combined to give the established Mathieu equation. Therefore, the governed transition curves were, theoretically, obtained. Finally, the results were numerically confirmed. K E Y W O R D S magnetic field, mass and heat transfer, porous media, stability analysis, viscous potential flow