ATLANTA — Southern Co. is buying Nicor’s parent company, AGL Resources Inc., for about $7.93 billion, which would create the second-biggest utility company in the U.S. by customer base.

The combined business will include 11 regulated electric and natural gas distribution companies, serving about 9 million customers in nine states. Customers will continue to be served by their current gas and electric utility companies.

Atlanta-based Southern will pay $66 in cash for each AGL share, a 38 percent premium to the company’s Friday closing price of $47.86.

Southern and AGL put the deal’s enterprise value at about $12 billion. The enterprise value figure typically includes assumed debt.

AGL, which will maintain its headquarters in Atlanta, will become a subsidiary of Southern.

The transaction is expected to add to Southern’s earnings per share in the first full year after the acquisition closes.

Both companies’ boards have approved the transaction, which is targeted to close in the second half of 2016. It still needs approval from AGL shareholders and certain state utility and other regulatory commissions.