We introduce field theory techniques through which the deconfinement transition of four-dimensional Yang-Mills theory can be moved to a semi-classical domain where it becomes calculable using two-dimensional field theory. We achieve this through a double-trace deformation of toroidally compactified Yang-Mills theory onAt large N , fixed-L, and arbitrary β, 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 β, 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 [1] regarding the magnetic component of the quark-gluon plasma at RHIC.