The origin of the terrestrial atmosphere is one of the most puzzling enigmas in the planetary sciences. It is suggested here that two sources contributed to its formation, fractionated nebular gases and accreted cometary volatiles. During terrestrial growth, a transient gas envelope was fractionated from nebular composition. This transient atmosphere was mixed with cometary material. The fractionation stage resulted in a high Xe/Kr ratio, with xenon being more isotopically fractionated than krypton. Comets delivered volatiles having low Xe/Kr ratios and solar isotopic compositions. The resulting atmosphere had a near-solar Xe/Kr ratio, almost unfractionated krypton delivered by comets, and fractionated xenon inherited from the fractionation episode. The dual origin therefore provides an elegant solution to the long-standing "missing xenon" paradox. It is demonstrated that such a model could explain the isotopic and elemental abundances of Ne, Ar, Kr, and Xe in the terrestrial atmosphere.