EXHIBIT 5.1


                                                     July 13, 1999

The AES Corporation
1001 North 19th Street
Arlington, Virginia  22209

Ladies and Gentlemen:

           We have acted as counsel in connection with the Registration
Statement on Form S-3 (the "Registration Statement") filed by The AES
Corporation (the "Company") with the Securities and Exchange Commission
pursuant to the Securities Act of 1933, as amended, for the registration of
the sale by the Company from time to time of up to $2,500,000,000 aggregate
principal amount of (i) senior debt securities, senior subordinated debt
securities and junior subordinated debt trust securities (the "Junior
Subordinated Debt Trust Securities") issued directly or to a Trust referred to
below (collectively, the "Debt Securities"), (ii) preferred stock, no par
value, (the "Preferred Stock") of the Company, (iii) common stock, par value
$0.01 per share, (the "Common Stock") of the Company, (iv) preferred
securities (the "Preferred Securities") of AES Trust III, AES Trust IV and AES
Trust V, each a statutory business trust created under the Business Trust Act
of the State of Delaware (each, a "Trust" and, collectively, the "Trusts"),
(v) guarantees of the Preferred Securities by the Company (the "Guarantees"),
(vi) stock purchase contracts to purchase Common Stock (the "Stock Purchase
Contracts"), (vii) stock purchase units, each representing ownership of a
Stock Purchase Contract and Debt Securities or debt obligations of third
parties (the "Stock Purchase Units") and (viii) debt securities warrants,
preferred stock warrants and common stock warrants (the "Warrants"). The
senior Debt Securities are to be issued pursuant to an indenture (the "Senior
Debt Indenture") between the Company and The First National Bank of Chicago,
as trustee, or the Bank of New York, as trustee. The senior subordinated Debt
Securities are to be issued pursuant to an Indenture (the "Senior Subordinated
Debt Indenture") between the Company and The First National Bank of Chicago,
as trustee, or the Bank of New York, as trustee. The junior subordinated Debt
Securities are to be issued pursuant to an Indenture (the "Junior Subordinated
Debt Indenture") between the Company and The First National Bank of Chicago,
as trustee, or the Bank of New York, as trustee. The Junior Subordinated Debt
Trust Securities are to be issued pursuant to an indenture (the "Junior
Subordinated




The AES Corporation                  -2-                         July 13, 1999


Debt Trust Indenture") between the Company and the First National Bank of
Chicago, as trustee, or the Bank of New York, as trustee. The First National
Bank of Chicago and the Bank of New York in their capacity as trustee under
the Senior Debt Indenture, the Senior Subordinated Debt Indenture, the Junior
Subordinated Debt Indenture and the Junior Subordinated Debt Trust Indenture
are referred to herein as the "Trustee" and the Senior Debt Indenture, Senior
Subordinated Debt Indenture, Junior Subordinated Debt Indenture and the Junior
Subordinated Debt Trust Indenture are referred to herein collectively as the
"Indentures".

           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 Debt Security
          have been duly authorized, executed and delivered by the Trustee and
          the Company, the specific terms of a particular Debt Security have
          been duly authorized and established in accordance with the
          applicable Indenture and such Debt Security has been duly
          authorized, executed, authenticated, issued and delivered in
          accordance with the applicable Indenture and the applicable
          underwriting or other agreement, such Debt Security will constitute
          a valid and binding obligation of the Company, enforceable in
          accordance with its terms, except as (a) the enforceability thereof
          may be limited by bankruptcy, insolvency, reorganization, fraudulent
          transfer, moratorium or similar laws now or hereinafter in effect
          relating to or affecting the enforcement of creditors' rights
          generally and (b) the availability of equitable remedies may be
          limited by equitable principles of in a proceeding at law or in
          equity).

                    2. Upon designation of the relative rights, preferences and
         limitations of any series of Preferred Stock by the Board of
         Directors of the Company and the proper filing with the Secretary of
         State of the State of Delaware of a Certificate of Designation
         relating to such series of Preferred Stock, all necessary corporate
         action on the part of the Company will have been taken to authorize
         the issuance and sale of such series of Preferred Stock proposed to
         be sold by the Company, and when such shares of Preferred Stock are
         issued and delivered in accordance with the applicable underwriting
         or other agreement, such shares of Preferred Stock will be validly
         issued, fully paid and non-assessable, enforceable in

(
                                       2




The AES Corporation                   -3-                        July 13, 1999


         accordance with their terms, except as (a) the enforceability thereof
         may be limited by bankruptcy, insolvency, reorganization, fraudulent
         transfer, moratorium or similar laws now or hereinafter in effect
         relating to or affecting the enforcement of creditors' rights
         generally and (b) the availability of equitable remedies may be
         limited by equitable principles of general applicability (regardless
         of whether considered in a proceeding at law or in equity).

                    3. When necessary corporate action on the part of the
         Company has been taken to authorize the issuance and sale of such
         shares of Common Stock proposed to be sold by the Company, and when
         such shares of Common Stock are issued and delivered in accordance
         with the applicable underwriting or other agreement, such shares of
         Common Stock will be validly issued, fully paid and non-assessable.

                    4. When the Guarantees have been duly authorized by the
         Company, the applicable Guarantee Agreement has been duly 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
         Guarantees will constitute valid and binding obligations of the
         Company, enforceable in accordance with their terms, except as (a)
         the enforceability thereof may be limited by bankruptcy, insolvency,
         reorganization, fraudulent transfer, moratorium or similar laws now
         or hereinafter in effect relating to or affecting the enforcement of
         creditors' rights generally and (b) the availability of equitable
         remedies may be limited by equitable principles of general
         applicability (regardless of whether considered in a proceeding at
         law or in equity).

                    5. When the Stock Purchase Units and Stock Purchase
         Contracts have been duly authorized by the Company, the applicable
         Purchase Contract Agreement and Pledge Agreement have been duly
         executed and delivered, the Stock Purchase Units and Stock Purchase
         Contracts will constitute valid and binding obligations of the
         Company, enforceable in accordance with their terms, except as (a)
         the enforceability thereof may be limited by bankruptcy, insolvency,
         reorganization, fraudulent transfer, moratorium or similar laws now
         or hereinafter in effect relating to or affecting the enforcement of
         creditors' rights generally and (b) the availability of equitable
         remedies may be limited by equitable principles of general
         applicability (regardless of whether considered in a proceeding at
         law or in equity).


                                       3




The AES Corporation                   -4-                        July 13, 1999

                    6. When the Warrants have been duly authorized by the
         Company and the applicable Warrant Agreement and the applicable
         Warrant Certificate have been duly executed and delivered, the
         Warrants will constitute valid and binding obligations of the
         Company, enforceable in accordance with their terms, except as (a)
         the enforceability thereof may be limited by bankruptcy, insolvency,
         reorganization, fraudulent transfer, moratorium or similar laws now
         or hereinafter in effect relating to or affecting the enforcement of
         creditors' rights generally and (b) the availability of equitable
         remedies may be limited by equitable principles of general
         applicability (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 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; and (iii) 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 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.

          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


                                       4