We introduce field theory techniques through which the deconfinement transition of four-dimensional Yang-Mills theory can be moved to a semiclassical domain where it becomes calculable using two-dimensional field theory. We achieve this through a double-trace deformation of toroidally compactified Yang-Mills theory on R-2 x S-L(1) x S-beta(1). At large N, fixed-L, and arbitrary beta, the thermodynamics of the deformed theory is equivalent to that of ordinary Yang-Mills theory at leading order in the large N expansion. At fixed-N, small L and a range of beta, the deformed theory maps to a two-dimensional theory with electric and magnetic (order and disorder) perturbations, analogs of which appear in planar spin-systems and statistical physics. We show that in this regime the deconfinement transition is driven by the competition between electric and magnetic perturbations in this two-dimensional theory. This appears to support the scenario proposed by Liao and Shuryak [J. Liao and E. Shuryak, Phys. Rev. C 75, 054907 (2007).] regarding the magnetic component of the quark-gluon plasma at RHIC.