A thin film technology compatible with multilayer device fabrication is critical for exploring the potential of the 39-K superconductor magnesium diboride for superconducting electronics. Using a Hybrid Physical-Chemical Vapor Deposition (HPCVD) process, it is shown that the high Mg vapor pressure necessary to keep the MgB 2 phase thermodynamically stable can be achieved for the in situ growth of MgB 2 thin films. The films grow epitaxially on (0001) sapphire and (0001) 4H-SiC substrates and show a bulk-like T c of 39 K, a J c (4.2K) of 1.2 × 10 7 A/cm 2 in zero field, and a H c2 (0) of 29.2 T in parallel magnetic field. The surface is smooth with a root-mean-square roughness of 2.5 nm for MgB 2 films on SiC. This deposition method opens tremendous opportunities for superconducting electronics using MgB 2 .