Using the general notions of Batalin, Fradkin, Fradkina and Tyutin to convert second-class systems into first-class ones, we present a gauge-invariant formulation of the massive Yang-Mills theory by embedding it in an extended phase space. The infinite set of correction terms necessary for obtaining the involutive constraints and Hamiltonian is explicitly computed and expressed in a closed form. It is also shown that the extra fields introduced in the correction terms are exactly identified with the auxiliary scalars used in the generalized Stuckelberg formalism for converting a gauge non-invariant Lagrangian into a gauge-invariant form. (C) 1997 Elsevier Science B.V.