Except in regions of recent crustal extension(1), the dominant origin of ca
rbon dioxide in fluids in sedimentary basins has been assumed to be from cr
ustal organic matter(2) or mineral reactions(3,4). Here we show, by contras
t, that Rayleigh fractionation caused by partial degassing of a magma body
can explain the CO2/He-3 ratios and delta C-13(CO2) values observed in CO2-
rich natural gases in the west Texas Val Verde basin and also the mantle He
-3/Ne-22 ratios observed in other basin systems(5). Regional changes in CO2
/He-3 and CO2/CH4 ratios can be explained if the CO2 input pre-dates methan
e generation in the basin, which occurred about 280 Myr ago(6). Uplift to t
he north of the Val Verde basin between 310 and 280 Myr ago(6) appears to b
e the only tectonic event with appropriate timing and location to be the so
urce of the magmatic CO2. Our identification of magmatic CO2 in a foreland
basin indicates that the origin of CO2 in other midcontinent basin systems
should be re-evaluated. Also, the inferred closed-system preservation of na
tural gas in a trapping structure for similar to 300 Myr is far longer than
the residence time predicted by diffusion models(7,8).