EXHIBIT 5.1 [LETTERHEAD OF DAVIS POLK & WARDWELL] March 25, 1998 The AES Corporation 1001 North 19th Street Arlington, Virginia 22209 AES Trust II c/o The AES Corporation 1001 North 19th Street Arlington, Virginia 22209 Dear Ladies and Gentlemen: We have acted as counsel for The AES Corporation (the "Company") and AES Trust II (the "Trust") in connection with the Registration Statement on Form S-3 (the "Registration Statement") filed by the Company and the Trust with the Securities and Exchange Commission under the Securities Act of 1933, as amended (the "Securities Act"), relating to the registration of the Trust's $2.75 Term Convertible Securities, series B, liquidation amount $50 per security (the "TECONS") to be sold by certain holders of such TECONS. The TECONS were issued pursuant to the provisions of the Amended and Restated Declaration of Trust dated as of October 29, 1997 (the "Declaration") among the Company, as sponsor, First Chicago Delaware Inc., The First National Bank of Chicago, sponsor, First Chicago Delaware Inc., the First National Bank of Chicago, William R. Luraschi, Barry J. Sharp and Willard Hoagland as trustees, and are guaranteed by the Company to the extent described in the Preferred Securities Guarantee Agreement dated as of October 29, 1997 (the Guarantee"). The Trust has acquired $309,278,400 aggregate principal amount of 5.50% Junior Subordinated Convertible Debentures (the "Debentures") with the proceeds from the sale of the TECONS and the sale to the Company of the common securities of the Trust. The Debentures were issued pursuant to the provisions of the Subordinated indenture dated as of March 1, 1997 between the Company and the First National Bank of Chicago, as trustee, as supplemented by a Second The AES Corporation 2 March 25, 1998 Supplemental Indenture dated as of October 29, 1997 (the Indenture as so supplemented is hereinafter referred to as the "Indenture"). 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 or advisable for the purpose of rendering this opinion. Based upon the foregoing, we are of the opinion that: (i) the Debentures have been duly authorized and, assuming that they have been executed and authenticated in accordance with the provisions of the Indenture and delivered to and paid for by the Trust, are valid and binding obligations of the Company, entitled to the benefits of the Indenture, enforceable against the Company in accordance with their terms, except that the enforcement thereof may be subject to (i) bankruptcy, insolvency, reorganization, moratorium, fraudulent conveyance or other similar laws now or hereafter in effect relating to creditors' rights generally and (ii) general principles of equity, regardless of whether enforcement is sought in a proceeding at law or in equity; (ii) the Guarantee has been duly authorized, executed and delivered by the Company and (assuming) due authorization, execution and delivery threre of by the Guarantee Trustee), constitutes a valid and binding agreement of the Company enforceable against the Company in accordance with its terms, except that the enforcement thereof may be subject to (bankruptcy, insolvency, reorganization, moratorium, fraudulent conveyance or other similar laws now or hereafter in effect relating to creditors' rights generally and (ii) general principles of equity, regardless of whether enforcement is sought in a proceeding at law or in equity; and (iii) the shares of Common Stock issuable upon conversion of the Securities have been duly authorized by the company and validly reserved for issuance by the Company upon such conversion by all necessary corporate action and such Common Stock, when duly issued upon such conversion, will be validly issued and fully paid and non-assessable; no holder thereof is subject to personal liability solely by reason of being The AES Corporation 3 March 25, 1998 such a holder; and the issuance of such Common Stock upon such conversion is not subject to preemptive rights. We are members of the Bar of the State of New York and the foregoing opinion is limited to the laws of the State of New York, the federal laws of the United States of America and the General Corporation Law of the State of Delaware. We hereby consent to the filing of this opinion as an exhibit to the Registration Statement. In addition, we consent to the reference to us under the caption "Legal Matters" in the Prospectus constituting a part of the Registration Statement. This opinion is rendered solely to you in connection with the above matter. This opinion may not be relied upon by you for any other purpose or relied upon by or furnished to any other person without our prior written consent. Very truly yours, /s/ Davis Polk & Wardwell ---------------------------