We study D (D) over bar* (D*(D) over bar) scattering in the framework of unitarized heavy meson chiral perturbation theory with pion exchange and a contact interaction. S-3(1) - D-3(1) mixing effects are taken into account. A loosely bound state X(3872), with the pole position being M-pole = (3871.70 - i0.39) MeV, is found. The result is not sensitive to the strength of the contact interaction. Our calculation provides a theoretical confirmation of the existence of the 1(++) state X(3872). The light quark mass dependence of the pole position indicates it has a predominately D (D) over bar* (D*(D) over bar) molecular nature. When the pi mass is larger than 142 MeV, the pole disappears, which makes impossible the lattice simulation of this state at large quark mass.