Exxon Mobil Corp will buy XTO Energy Inc, one of the largest U.S. natural gas producers, in an all-stock transaction valued at $41 billion including debt, the companies said on Monday.

The deal includes about $10 billion in XTO debt, and is based on the December 11 closing share prices in the two companies.

Exxon will issue 0.7098 common share for each share of XTO, representing a premium of about 25 percent over XTO's closing price on Friday.

XTO is one of the leading developers of unconventional natural gas resources, such as shale gas, which has emerged as a potentially huge new resource play in the world's largest energy consumer.

(Reporting by Matt Daily, editing by Maureen Bavdek)