Alabama Power Company November 20, 2002 Page 2 Exhibit 5.1(b) November 20, 2002 Alabama Power Company 600 North 18th Street Birmingham, AL 35291 RE: Registration Statement on Form S-3 Ladies and Gentlemen: We have acted as counsel to Alabama Power Company (the "Company") in connection with the Registration Statement on Form S-3 (Registration Statement Nos. 333-100721, 333-100721-01, 333-100721-02 and 333-100721-03) filed with the Securities and Exchange Commission (the "Commission") on October 24, 2002 and declared effective by the Commission on November 6, 2002 (the "Registration Statement"), under the Securities Act of 1933, as amended (the "Act"), relating to $100,000,000 aggregate principal amount of the Company's Series R 4.70% Senior Notes due December 1, 2010 (the "Notes"). The Notes will be issued pursuant to the Senior Note Indenture dated as of December 1, 1997 between the Company and JPMorgan Chase Bank (formerly known as The Chase Manhattan Bank), as trustee (the "Trustee"), as amended and supplemented by an Eighteenth Supplemental Indenture dated as of November 26, 2002 (collectively, the "Indenture"). We have examined the Registration Statement and also the Indenture, which has been filed with the Commission as an exhibit to the Registration Statement. We have also examined the originals, or duplicates or certified or conformed copies, of such records, agreements, instruments and other documents and have made such other and further investigations as we have deemed relevant and necessary in connection with the opinions expressed herein. As to questions of fact material to this opinion, we have relied upon certificates of public officials and of officers and representatives of the Company. In rendering the opinions set forth below, we have assumed the genuineness of all signatures, the legal capacity of natural persons, the authenticity of all documents submitted to us as originals, the conformity to original documents of all documents submitted to us as duplicates or certified or conformed copies and the authenticity of the originals of such latter documents. We have also assumed that the Indenture is the valid and legal binding obligation of the Trustee. Based upon the foregoing, and subject to the qualifications and limitations stated herein, we are of the opinion that the Notes are valid, binding and legal obligations of the Company enforceable against the Company in accordance with their terms (subject to applicable bankruptcy, insolvency, reorganization, moratorium and other similar laws relating to or affecting creditors' rights generally and to general principles of equity, whether considered in a proceeding at law or in equity). In rendering the foregoing opinion, 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 Alabama and we do not express any opinion herein concerning any law other than the law of the State of Alabama and the federal law of the United States and, to the extent set forth herein, the law of the State of New York. We hereby consent to the filing of this opinion with the Commission as an exhibit to the Registration Statement and to the statements with respect to our name under the heading "Legal Matters" in the prospectus forming part of 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/ Balch & Bingham LLP Annex I October 24, 2002 Balch & Bingham LLP 1901 Sixth Avenue North Birmingham, Alabama 35203 Re: Registration Statement on Form S-3 Ladies and Gentlemen: We are acting as counsel to the prospective underwriters in connection with the preparation of a Registration Statement on Form S-3, including a preliminary prospectus (the "Registration Statement"), which is to be filed with the Securities and Exchange Commission (the "Commission") under the Securities Act of 1933, as amended (the "Act"), for the registration under the Act of (1) First Mortgage Bonds to be issued by the Company, (2) Class A Preferred Stock to be issued by the Company, (3) Senior Notes (the "Senior Notes") to be issued by the Company, (4) Junior Subordinated Notes (the "Junior Subordinated Notes") to be issued by the Company, (5) Trust Preferred Securities to be issued by Alabama Power Capital Trust VI, Alabama Power Capital Trust VII and Alabama Power Capital Trust VIII and (6) the Company's Guarantees (as defined in the Registration Statement) with respect to such Trust Preferred Securities. The Senior Notes will be issued pursuant to a senior note indenture, dated as of December 1, 1997, as supplemented, between the Company and the trustee named therein (the "Senior Note Indenture"), the Junior Subordinated Notes will be issued pursuant to a subordinated note indenture, dated as of January 1, 1997, as supplemented, between the Company and the trustee named therein (the "Subordinated Note Indenture") and the Guarantees will be issued pursuant to separate guarantee agreements, each between the Company and the trustee named therein (the "Guarantee Agreements"), in each case in the respective forms filed as exhibits to the Registration Statement. We are of the opinion that, upon compliance with the pertinent provisions of the Act, the Trust Indenture Act of 1939, as amended, and the Public Utility Holding Company Act of 1935, as amended, upon compliance with applicable securities or "blue sky" laws of various jurisdictions, and upon the adoption of appropriate resolutions by the Board of Directors of the Company or a duly authorized committee thereof, when the Senior Notes, the Junior Subordinated Notes and the Guarantees have been issued and sold upon the terms specified in the orders of the Alabama Public Service Commission, when the Senior Note Indenture and any supplemental indenture to be entered into in connection with the issuance of the Senior Notes, the Subordinated Note Indenture and any supplemental indenture to be entered into in connection with the issuance of the Junior Subordinated Notes or the Guarantee Agreements, as applicable, have been duly executed and delivered by the proper officers of the Company and the trustees named therein, and when the Senior Notes and the Junior Subordinated Notes, as the case may be, have been executed, authenticated and delivered in accordance with the terms of the Senior Note Indenture, and the Subordinated Note Indenture, as applicable, the Senior Notes, the Junior Subordinated Notes and the Guarantees will be valid, binding and legal obligations of the Company, subject to applicable bankruptcy, insolvency, reorganization, moratorium and similar laws relating to or affecting creditors' rights generally from time to time in force and to general principles of equity, 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 Registration Statement shall have been declared effective and such effectiveness shall not have been terminated or rescinded and (ii) 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 the Company 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 the Company, or any restriction imposed by any court or governmental body having jurisdiction over the Company. We are members of the State Bar of New York and we do not express any opinion 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 the Company 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. 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 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