Early in Earth's history, the Sun provided less energy to the Earth than it does today. However, the Earth was not permanently glaciated, an apparent contradiction known as the faint young Sun paradox. By implication, the Earth must have been warmed by a stronger greenhouse effect or a lower planetary albedo. Here we use a radiative?convective climate model to show that more N2 in the atmosphere would have increased the warming effect of existing greenhouse gases by broadening their absorption lines. With the atmospheric CO2 and CH4 levels estimated for 2.5 billion years ago, a doubling of the present atmospheric nitrogen (PAN) level would cause a warming of 4.4 degrees C. Our new budget of Earth's geological nitrogen reservoirs indicates that there is a sufficient quantity of nitrogen in the crust (0.5 PAN) and mantle (greater than 1.4 PAN) to have supported this, and that this nitrogen was previously in the atmosphere. In the mantle, N correlates with 40Ar, the daughter product of 40K, indicating that the source of mantle N is subducted crustal rocks in which NH4+ has been substituted for K+. We thus conclude that a higher nitrogen level probably helped warm the early Earth, and suggest that the effects of N2 should be considered in assessing the habitable zone for terrestrial planets.