Exhibit 5.1 Troutman Sanders LLP 600 Peachtree Street Atlanta, Georgia 30308 404-885-3000 July 16, 2001 The Southern Company 270 Peachtree Street, N.W. Atlanta, Georgia 30303 Southern Company Capital Funding, Inc. 1403 Foulk Road, Suite 102 Wilmington, Delaware 19803 Re: Registration Statement on Form S-3 Ladies and Gentlemen: We are acting as counsel to The Southern Company ("Southern") and Southern Company Capital Funding, Inc. ("Capital") in connection with the above-referenced Registration Statement on Form S-3 filed with the Securities and Exchange Commission (the "Commission") on July 16, 2001 (the "Registration Statement"), for the registration under the Securities Act of 1933, as amended (the "Act"), of (1) Junior Subordinated Notes (the "Junior Subordinated Notes") to be issued by Capital, (2) Trust Preferred Securities (the "Preferred Securities") to be issued by Southern Company Capital Trust VI and Southern Company Capital Trust VII (each, a "Trust"), (3) Southern's guarantees of the Preferred Securities (the "Preferred Securities Guarantees"), (4) Southern's guarantees of the Junior Subordinated Notes (the "Junior Subordinated Notes Guarantees"), (5) Senior Notes (the "Senior Notes" and, together with the Junior Subordinated Notes, the "Notes") to be issued by Capital and (6) Southern's guarantees of the Senior Notes (the "Senior Notes Guarantees" and, together with the Junior Notes Guarantees, the "Guarantees"). The Junior Subordinated Notes and the Junior Subordinated Notes Guarantees will be issued pursuant to a subordinated note indenture, as supplemented, among Southern, Capital and the trustee named therein (the "Subordinated Note Indenture"), the Preferred Securities Guarantees will be issued pursuant to a guarantee agreement between Southern and the trustee named therein (the "Preferred Securities Guarantee Agreements") and the Senior Notes and the Senior Notes Guarantees will be issued pursuant to a senior note indenture, as supplemented, among Southern, Capital and the trustee named therein (the "Senior Note Indenture" and, together with the Subordinated Note Indenture, the "Indentures"), in each case in the respective forms filed as exhibits to the Registration Statement. We have examined originals or copies, certified or otherwise identified to our satisfaction, of such documents, corporate records, certificates of public officials and other instruments as we have deemed necessary for the purposes of rendering this opinion. On the basis of the foregoing, we are of the opinion that: 1. When the Indentures and any supplemental indenture to be entered into in connection with the issuance of any Note have been duly authorized, executed and delivered by the trustee, Capital and Southern, the specific terms of a particular Note have been duly authorized and established in accordance with the applicable Indenture and such Note has been duly authorized, executed, authenticated, issued and delivered in accordance with the applicable Indenture and the applicable underwriting or other agreement, such Note will constitute a valid and binding obligation of Capital, enforceable in accordance with its terms, subject to (a) bankruptcy, insolvency, reorganization, fraudulent transfer, moratorium or similar laws now or hereafter in effect relating to or affecting the enforcement of creditors' rights generally and (b) general principles of equity (regardless of whether considered in a proceeding at law or in equity). 2. When the applicable Preferred Securities Guarantee Agreement has been duly authorized, executed and delivered and the Preferred Securities have been duly issued and delivered by the applicable Trust as contemplated by the Registration Statement and any prospectus supplement relating thereto, the Preferred Securities Guarantees will constitute valid and binding obligations of Southern, enforceable in accordance with their terms, subject to (a) bankruptcy, insolvency, reorganization, fraudulent transfer, moratorium or similar laws now or hereafter in effect relating to or affecting the enforcement of creditors' rights generally and (b) general principles of equity (regardless of whether considered in a proceeding at law or in equity). 3. When the Indentures and any supplemental indenture to be entered into in connection with the issuance of any Guarantee have been duly authorized, executed and delivered by the parties thereto, the specific terms of a particular Guarantee have been duly authorized and established in accordance with the applicable Indenture and any Guarantee has been duly authorized, executed, issued and delivered in accordance with the applicable Indenture and the applicable underwriting or other agreement, such Guarantee will constitute a valid and binding obligation of Southern, enforceable in accordance with its terms, subject to (a) bankruptcy, insolvency, reorganization, fraudulent transfer, moratorium or similar laws now or hereafter in effect relating to or affecting the enforcement of creditors' rights generally and (b) general principles of equity (regardless of whether considered in a proceeding at law or in equity). In connection with the opinions expressed above, we have assumed that, at or prior to the time of the delivery of any such security, (i) the Board of Directors of Southern or Capital, as applicable, shall have duly established the terms of such security and duly authorized the issuance and sale of such security and such authorization shall not have been modified or rescinded; (ii) the Registration Statement shall have been declared effective and such effectiveness shall not have been terminated or rescinded; (iii) the issuance of the securities shall be in compliance with the pertinent provisions of the Act, the Trust Indenture Act of 1939, as amended, the Public Utility Holding Company Act of 1935, as amended, and the applicable securities or blue sky laws of various jurisdictions; and (iv) there shall not have occurred any change in law affecting the validity or enforceability of such security. We have also assumed that none of the terms of any security to be established subsequent to the date hereof, nor the issuance and delivery of such security, nor the compliance by each of Capital and Southern with the terms of such security will violate any applicable law or will result in a violation of any provision of any instrument or agreement then binding upon each of Capital and Southern, or any restriction imposed by any court or governmental body having jurisdiction over Capital or Southern. In rendering the foregoing opinions, with respect to matters of New York law, we have relied on the opinion of Dewey Ballantine LLP attached hereto as Annex I. We are members of the State Bar of Georgia and we do not express any opinion herein concerning any law other than the law of the State of Georgia, the General Corporation Law of the State of Delaware and the federal law of the United States and, to the extent set forth herein, the laws of the State of New York. We hereby consent to the filing of this opinion as an exhibit to the Registration Statement and to the statements with respect to our firm under the caption "Legal Matters" in the Registration Statement. In giving the foregoing consent, we do not hereby admit that we come within the category of persons whose consent is required under Section 7 of the Act or the rules and regulations of the Commission thereunder. This opinion may not be furnished or quoted to, or relied upon by, any other person for any purpose, without our prior written consent. Very truly yours, /s/Troutman Sanders LLP TROUTMAN SANDERS LLP Annex I Dewey Ballantine LLP 1301 Avenue of the Americas New York, New York 10019 July 16, 2001 Troutman Sanders LLP 600 Peachtree Street, N.E. Suite 5200 Atlanta, Georgia 30308 Re: Registration Statement on Form S-3 Ladies and Gentlemen: We are acting as counsel to the underwriters in connection with the above-referenced Registration Statement on Form S-3 filed with the Securities and Exchange Commission (the "Commission") on July 16, 2001 (the "Registration Statement"), for the registration under the Securities Act of 1933, as amended (the "Act"), of (1) Junior Subordinated Notes (the "Junior Subordinated Notes") to be issued by Southern Company Capital Funding, Inc. ("Capital"), (2) Trust Preferred Securities (the "Preferred Securities") to be issued by Southern Company Capital Trust VI and Southern Company Capital Trust VII (each, a "Trust"), (3) guarantees of The Southern Company ("Southern") relating to the Preferred Securities (the "Preferred Securities Guarantees"), (4) guarantees of Southern relating to the Junior Subordinated Notes (the "Junior Subordinated Notes Guarantees"), (5) Senior Notes (the "Senior Notes" and, together with the Junior Subordinated Notes, the "Notes") to be issued by Capital and (6) guarantees of Southern relating to the Senior Notes (the "Senior Notes Guarantees" and, together with the Junior Notes Guarantees, the "Guarantees"). The Junior Subordinated Notes and the Junior Subordinated Notes Guarantees will be issued pursuant to a subordinated note indenture, as supplemented, among Southern, Capital and the trustee named therein (the "Subordinated Note Indenture"), the Preferred Securities Guarantees will be issued pursuant to a guarantee agreement between Southern and the trustee named therein (the "Preferred Securities Guarantee Agreements") and the Senior Notes and the Senior Notes Guarantees will be issued pursuant to a senior note indenture, as supplemented, among Southern, Capital and the trustee named therein (the "Senior Note Indenture" and, together with the Subordinated Note Indenture, the "Indentures"), in each case in the respective forms filed as exhibits to the Registration Statement. We have examined originals or copies, certified or otherwise identified to our satisfaction, of such documents, corporate records, certificates of public officials and other instruments as we have deemed necessary for the purposes of rendering this opinion. Troutman Sanders LLP July 16, 2001 Page 2 On the basis of the foregoing, we are of the opinion that: 1. When the Indentures and any supplemental indenture to be entered into in connection with the issuance of any Note have been duly authorized, executed and delivered by the trustee, Capital and Southern, the specific terms of a particular Note have been duly authorized and established in accordance with the applicable Indenture and such Note has been duly authorized, executed, authenticated, issued and delivered in accordance with the applicable Indenture and the applicable underwriting or other agreement, such Note will constitute a valid and binding obligation of Capital, enforceable in accordance with its terms, subject to (a) bankruptcy, insolvency, reorganization, fraudulent transfer, moratorium or similar laws now or hereafter in effect relating to or affecting the enforcement of creditors' rights generally and (b) general principles of equity (regardless of whether considered in a proceeding at law or in equity). 2. When the applicable Preferred Securities Guarantee Agreement has been duly authorized, executed and delivered and the Preferred Securities have been duly issued and delivered by the applicable Trust as contemplated by the Registration Statement and any prospectus supplement relating thereto, the Preferred Securities Guarantees will constitute valid and binding obligations of Southern, enforceable in accordance with their terms, subject to (a) bankruptcy, insolvency, reorganization, fraudulent transfer, moratorium or similar laws now or hereafter in effect relating to or affecting the enforcement of creditors' rights generally and (b) general principles of equity (regardless of whether considered in a proceeding at law or in equity). 3. When the Indentures and any supplemental indenture to be entered into in connection with the issuance of any Guarantee have been duly authorized, executed and delivered by the parties thereto, the specific terms of a particular Guarantee have been duly authorized and established in accordance with the applicable Indenture and any Guarantee has been duly authorized, executed, issued and delivered in accordance with the applicable Indenture and the applicable underwriting or other agreement, such Guarantee will constitute a valid and binding obligation of Southern, enforceable in accordance with its terms, subject to (a) bankruptcy, insolvency, reorganization, fraudulent transfer, moratorium or similar laws now or hereafter in effect relating to or affecting the enforcement of creditors' rights generally and (b) general principles of equity (regardless of whether considered in a proceeding at law or in equity). In connection with the opinions expressed above, we have assumed that, at or prior to the time of the delivery of any such security, (i) the Board of Directors of Southern or Capital, as applicable, shall have duly established the terms of such security and duly authorized the issuance and sale of such Troutman Sanders LLP July 16, 2001 Page 3 security and such authorization shall not have been modified or rescinded; (ii) the Registration Statement shall have been declared effective and such effectiveness shall not have been terminated or rescinded; (iii) the issuance of the securities shall be in compliance with the pertinent provisions of the Act, the Trust Indenture Act of 1939, as amended, the Public Utility Holding Company Act of 1935, as amended, and the applicable securities or blue sky laws of various jurisdictions; and (iv) there shall not have occurred any change in law affecting the validity or enforceability of such security. We have also assumed that none of the terms of any security to be established subsequent to the date hereof, nor the issuance and delivery of such security, nor the compliance by each of Capital and Southern with the terms of such security will violate any applicable law or will result in a violation of any provision of any instrument or agreement then binding upon each of Capital and Southern, or any restriction imposed by any court or governmental body having jurisdiction over Capital or Southern. We are members of the State Bar of New York and we do not express any opinion herein concerning any law other than the law of the State of New York. This opinion is furnished solely for your benefit in connection with your rendering an opinion to Southern and Capital to be filed as Exhibit 5.1 to the Registration Statement and we hereby consent to your attaching this opinion as an annex to such opinion. This opinion may not be relied upon by you for any other purpose, or quoted to or relied upon by any other person, firm or entity for any purpose, without our prior written consent. Very truly yours, /s/Dewey Ballantine LLP DEWEY BALLANTINE LLP