<Page>
                                                                     Exhibit 5.1


                       [Letterhead of Steven R. Sullivan]

                                 March 11, 2003


Union Electric Company
1901 Chouteau Avenue
St. Louis, Missouri 63103


Ladies and Gentlemen:

       I am Vice President Regulatory Policy, General Counsel and Secretary of
Union Electric Company, a Missouri corporation (the "COMPANY"). The Company and
Union Electric Capital Trust I, a Delaware business trust, have filed with the
Securities and Exchange Commission (the "COMMISSION") a Registration Statement
on Form S-3 (Registration Nos. 333-87506 and 333-87506-01) (the "REGISTRATION
STATEMENT") under the Securities Act of 1933, as amended (the "SECURITIES ACT"),
with respect to up to $750,000,000 maximum aggregate offering price of
securities, which was declared effective by the Commission on August 13, 2002.
On March 10, 2003, the Company issued and sold $184,000,000 of its 5.50% Senior
Secured Notes due 2034 (the "NOTES") pursuant to an indenture dated as of August
15, 2002 between the Company and The Bank of New York, as trustee (the
"INDENTURE").

       In connection with the issuance and sale of the Notes by the Company, I
have reviewed originals (or copies certified or otherwise identified to my
satisfaction) of the Registration Statement (including the exhibits thereto),
the Restated Articles of Incorporation and By-Laws of the Company as in effect
on the date hereof, the Indenture, a specimen of the Notes, corporate and other
documents, records and papers and certificates of public officials. In
connection with such review, I have assumed the genuineness of all signatures,
the legal capacity of natural persons, the conformity to the originals of the
documents submitted to me as certified or photostatic copies, the authenticity
of the originals of such documents and all documents submitted to me as
originals and the correctness of all statements of fact contained in such
original documents. I am a member of the Bar of the State of Missouri and, for
purposes of this opinion, do not hold myself out as an expert on the laws of any
jurisdiction other than the State of Missouri.

       On the basis of such review, I am of the opinion that the Notes have been
legally issued by the Company and constitute the valid and binding obligations
of the Company, subject to bankruptcy, insolvency, fraudulent conveyance,
reorganization, moratorium and other similar laws affecting creditors' rights,
to general equitable principles (whether considered in a proceeding in equity or
at law) and to an implied covenant of reasonableness, good faith and fair
dealing.

<Page>

Union Electric Company
March 11, 2003



       I hereby consent to the filing of this opinion as an exhibit to the
Company's Current Report on Form 8-K filed on March 11, 2003, which is
incorporated by reference in the Registration Statement.


                                      Very truly yours,


                                      /s/  Steven R. Sullivan
                                      -----------------------------------------
                                      Steven R. Sullivan
                                      Vice President Regulatory Policy, General
                                      Counsel and Secretary.





















                                       2