We are proposing a model for the delivery of volatiles to the inner planets by icy planetesimals (comets). Laboratory studies of the trapping of gases in ice forming at low temperatures simulate the formation of comet nuclei at various distances from the Sun in the solar nebula. The total gas content as well as the relative proportions of gases trapped in the ice are strong functions of temperature. As they trap N2 inefficiently, all planetesimals formed interior to Neptune are deficient in nitrogen, acquiring values of C/N resembling those found in the inner planet volatile inventories. A mixture of three basic types of comets appears capable of accounting for the observed volatile inventories on Venus, Earth, and Mars, with the caveat that impact erosion is necessary to explain the present condition of the martian atmosphere. The model includes the possibility of several epochs of clement conditions on early Mars. Some tests of these ideas are suggested, including measurements in Jupiter's atmosphere by the Galileo probe.