A variational analysis of the pure SU(N) gauge theory in 3+1 dimensions at finite temperature is performed, extending the work of Kogan, Kovner and Milhano in hep-ph/0208053 . A de-confining phase transition is found at a temperature of 470 MeV, somewhat higher than lattice estimates. This value is however rather sensitive, for reasons which are discussed. A more robust quantity is the ratio of the transition temperature to the lightest glueball mass in the model. This is 0.18, in agreement with the lattice estimate for SU(3) to two significant figures. Ways of further improving the calculation are discussed