Exhibit 5.1 Balch & Bingham LLP 1901 Sixth Avenue North, Suite 2600 Birmingham, Alabama 35203-2628 (205) 251-8100 February 6, 2007 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-126348, 333-126348-01, 333-126348-02 and 333-126348-03) filed with the Securities and Exchange Commission (the "Commission") on July 1, 2005 and declared effective by the Commission on July 19, 2005 (the "Registration Statement"), under the Securities Act of 1933, as amended (the "Act"), relating to $200,000,000 aggregate principal amount of the Company's Series 2007A 5.55% Senior Notes due February 1, 2017 (the "Notes"). The Notes will be issued pursuant to the Senior Note Indenture dated as of December 1, 1997 between the Company and The Bank of New York (as successor to JPMorgan Chase Bank, N.A. (formerly known as The Chase Manhattan Bank)), as trustee (the "Trustee"), as heretofore supplemented and amended and as further supplemented and amended by a Thirty-Seventh Supplemental Indenture dated as of February 6, 2007 (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 legally 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 (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 Alabama Power Company February 6, 2007 Page 2 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 Dewey Ballantine LLP 1301 Avenue of the Americas New York 10019-6092 212-259-8000 February 6, 2007 Balch & Bingham LLP 1901 Sixth Avenue North Birmingham, Alabama 35203 RE: Registration Statement on Form S-3 Ladies and Gentlemen: We have acted as counsel to the underwriters in connection with the Registration Statement on Form S-3 (Registration Statement Nos. 333-126348, 333-126348-01, 333-126348-02 and 333-126348-03) (the "Registration Statement") relating to $200,000,000 aggregate principal amount of Alabama Power Company's (the "Company") Series 2007A 5.55% Senior Notes due February 1, 2017 (the "Notes"). The Notes will be issued pursuant to the Senior Note Indenture dated as of December 1, 1997 between the Company and The Bank of New York (as successor to JPMorgan Chase Bank, N.A. (formerly known as The Chase Manhattan Bank)), as trustee (the "Trustee"), as heretofore supplemented and amended and as further supplemented and amended by a Thirty-Seventh Supplemental Indenture dated as of February 6, 2007 (collectively, the "Indenture"). We have examined the Registration Statement and the Indenture, which has been filed with the Securities and Exchange Commission (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 legally binding obligation of the Trustee. Balch & Bingham LLP February 6, 2007 Page 2 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 (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). 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. 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. In giving our consent to your attaching this opinion to the opinion being rendered by you, we do not hereby admit that we come within the category of persons whose consent is required under Section 7 of the Securities Act of 1933, as amended, or the rules and regulations of the Commission thereunder. Very truly yours, /s/Dewey Ballantine LLP DEWEY BALLANTINE LLP