We investigate the nature of the finite-temperature transition in QCD with N(f) massless flavors. Universality arguments show that a continuous phase transition may exist only if there is a stable fixed point in the three-dimensional Phi(4) theory characterized by the symmetry-breaking pattern [SU(N(f))(L) x SU(N(f))(R)]/Z(N(f))V --> SU(N(f))V/Z(N(f))V, or [U (N(f))(L) x U (N(f))(R)]/U (1)(V) --> U (N(f))(V) /U (1)(V) if the U (1)(A) symmetry is effectively restored at T(c). In order to determine the fixed points of these Phi(4) theories, we exploit a three-dimensional perturbative approach in which physical quantities are expanded in powers of renormalized quartic couplings. We compute the perturbative expansion of the beta-functions to six loops and determine their large-order behavior. No stable fixed point is found, except for N(f) = 2 corresponding to the symmetry-breaking pattern SO(4) --> SO(3). Therefore, the finite-temperature phase transition in QCD is of first order for N(f) greater than or equal to 3. A continuous phase transition is allowed only for N(f) = 2. But, since the theory with symmetry-breaking pattern [U(2)(L) x U(2)(R)]/U(t) --> U(2)(v)/U(1) does not have stable fixed points, the transition can be continuous only if the effective breaking of the U(I)A symmetry is sufficiently large.