
                                                                   EXHIBIT 5.01



                                                 March 8, 2002


Securities and Exchange Commission
450 Fifth Street, N.W.
Washington, D.C. 20549

Ladies and Gentlemen:

     We are acting as counsel for The AES Corporation (the "Registrant") in
connection with its Registration Statement on Form S-8 (the "Registration
Statement") to register under the Securities Act of 1933, as amended, 12,000,000
shares (the "Plan Shares") of the Registrant's Common Stock, par value of $0.01
per share, issuable pursuant to The AES Corporation 2001 Non-Officer Stock
Option Plan ("Non-Officer Plan").

     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 relating to the issuance of the Plan Shares as
we have deemed necessary for the purpose of this opinion.

     Upon the basis of the foregoing, we are of the opinion that the Plan Shares
deliverable pursuant to the Non-Officer Plan have been duly authorized and, when
and to the extent issued pursuant to the Non-Officer Plan upon receipt by the
Registrant of adequate consideration therefor, will be validly issued, fully
paid and nonassessable.

     We consent to the filing of this opinion as Exhibit 5.01 to the
Registration Statement.



                                Very truly yours,


                                 /s/ Davis Polk & Wardwell
                                -------------------------
                                Davis Polk & Wardwell

