The pressure near the deconfinement transition as determined up to now in lattice gauge theories shows unphysical behaviour: it can become negative and may in SU (3) even have a gap at the transition. This has been attributed to the use of only perturbatively known derivatives of coupling constants. We propose a method to evaluate the pressure, which works without these derivatives, and is valid on large lattices. In SU (2) we study the finite-volume effects and show that for lattices with spatial extent N-sigma greater-than-or-similar-to 15 these effects are negligible. In SU (3) we then ontain a postive and continuous pressure. The influence of non-perturbative corrections to the beta-function on the energy density are investigated and found to be important, in particular for the latent heat.