EXHIBIT 10.5 AGENCY AGREEMENT BETWEEN AMEREN ENERGY, INC. And UNION ELECTRIC COMPANY, AMEREN ENERGY MARKETING COMPANY And AMEREN ENERGY GENERATING COMPANY THIS AGENCY AGREEMENT, made and entered into as of May 1, 2000 by and between AMEREN ENERGY, INC., a corporation organized under the laws of the State of Missouri ("Ameren Energy"), and UNION ELECTRIC COMPANY ("AmerenUE"), a Missouri Corporation; AMEREN ENERGY MARKETING COMPANY ("Marketing Company"), an Illinois Corporation; and, AMEREN ENERGY GENERATING COMPANY ("Genco"), an Illinois Corporation ("Client Companies") (Ameren Energy and Client Companies hereinafter sometimes referred to individually as a "Party" and collectively as the "Parties"), W I T N E S S E T H: WHEREAS, Ameren Energy and Client Companies are subsidiaries of Ameren Corporation ("Ameren"), a registered holding company under the Public Utility Holding Company Act of 1935, and, together with Ameren's other direct and indirect subsidiaries, form the Ameren System; and WHEREAS, Ameren Energy is engaged in electricity, gas and energy commodity marketing and trading, and in so doing has assembled a highly-trained staff and developed and acquired various capabilities, programs, systems and other resources; and WHEREAS, Client Companies desire to procure services from Ameren Energy in the areas of bulk power marketing and procurement, procurement and management, and other services relating to the Client Companies' power marketing and trading functions; and WHEREAS, economies and increased efficiencies will result from the performance by Ameren Energy of certain support services for Client Companies that would enable Client Companies to operate more efficiently; and WHEREAS, subject to the terms and conditions herein described, Ameren Energy will render such services and provide such resources to Client Companies at cost, determined in accordance with applicable rules, regulations and orders of the Commission; NOW, THEREFORE, in consideration of the premises and of the mutual agreements herein, the Parties hereto hereby agree as follows: 1. Agreement to Furnish Support Services. ------------------------------------- Ameren Energy agrees to provide to Client Companies the following services: wholesale power trading of energy and/or capacity for periods of less than one year; capacity management; business reporting; transaction administration; contract and counter-party administration; regulatory reporting, support and compliance; the negotiation, execution and administration of contracts between any Client Company and third parties necessary to facilitate the above; and other related activities as requested. 2. Appointment of Ameren Energy as Agent. -------------------------------------- Client Companies hereby appoint Ameren Energy as Agent to represent the Client Companies in power sales, purchases and trades as described more fully above. Ameren Energy shall have no interest in the profits or revenues of any Client Company in respect of any 2 transaction in which Ameren Energy provides services, and shall not be liable for the performance or other obligations of any Client Company thereunder. Ameren Energy shall be accountable for all funds advanced or collected on behalf of a Client Company in connection with any transaction in respect of which Ameren Energy provides services. The provision of services by Ameren Energy pursuant to this Agreement shall in all cases and notwithstanding anything herein contained to the contrary be subject to any limitations contained in authorizations, rules or regulations of those governmental agencies, if any, having jurisdiction over Ameren Energy or such provision of services. 3. Third Party Reliance on Agency Agreement ---------------------------------------- The Client Companies have duly and properly appointed Ameren Energy as their agents. Ameren Energy has the full power and authority to transact business on behalf of the Client Companies, and, in particular, to transact for the purchase and sale of electric energy on behalf of the Client Companies. In furtherance of the authority referred to above, Ameren Energy has the right and power, whether or not under seal, to execute and deliver on behalf of the Client Companies such documents and agreements as may be required in such business transactions without delivering proof to any person of its authority to do so. The Client Companies will be legally bound by the terms of any agreement or contract entered into by Ameren Energy and will be responsible for satisfying the obligations of Ameren Energy under any such agreement or contract. The Client Companies, or, where a contract or agreement indicates that Ameren Energy is acting on behalf of only one of the Client Companies, the particular identified Client Company, shall be bound by the terms of any contract or agreement entered into by Ameren Energy, and obligations under such contract or agreement will be the obligations of the Client 3 Companies or the identified Client Company, as the case may be, and enforceable against them or it. 4. Compensation of Ameren Energy. ----------------------------- As compensation for services actually requested by Client Companies and rendered to it by Ameren Energy, Client Companies hereby agrees to reimburse Ameren Energy for all costs properly chargeable or allocable thereto, as controlled through a work order procedure. 5. Indemnification. --------------- A. Client Companies shall and do hereby agree to save harmless and defend Ameren Energy, and its officers, employees, and agents, from the payment of any sum or sums of money on account of, or resulting from, claims or suits growing out of or losses under any transaction in respect of which Ameren Energy shall agree to provide services, except to the extent that such claims, suits or losses result from the gross negligence or willful misconduct of Ameren Energy. Further, Client Companies shall and do hereby indemnify and agree to save harmless and defend Ameren Energy (a) from any and all liens, garnishments, attachments, claims, suits, costs, attorneys' fees, cost of investigation and of defense resulting from, incurred in connection with, or relating to any such claims, (b) from the payment of any such sum or sums of money, and (c) from the payment of any penalties, fines, damages, suits or claims (and any liens or attachments asserted in connection therewith) arising out of any alleged or actual violation of law, court order, or governmental agency rule or regulation committed by or existing with respect to Client Companies or their officers, employees, agents or subcontractors (including Ameren 4 Energy when such payments relate to performing services hereunder). B. Ameren Energy shall within five (5) business days after it receives notice of any claims, action, damages or liability against which it will expect to be indemnified pursuant to Article 4A, notify Client Company or Companies of such claims, actions, damages or liabilities. Thereafter, Client Companies may at their own expense, upon notice to Ameren Energy, defend or participate in the defense of such action or claim or any negotiation for settlement of such action or claim, provided that, unless Client Companies proceed promptly and in good faith to pay or defend such action or claim, then Ameren Energy shall have the right (but not the obligation), in good faith, upon ten (10) days' notice to Client Companies, to pay, settle, compromise or proceed to defend any such action or claim without the further participation by such Client Company or Companies. Client Companies will immediately pay (or reimburse Ameren Energy, as the case may be) any payments, settlements, compromises, judgments, costs or expenses made or incurred by Ameren Energy in or resulting from the pursuit by Ameren Energy of such right. If any judgment is rendered against Ameren Energy in any such action defended by Client Companies or Ameren Energy is otherwise entitled to indemnification under Article 4A, or if any lien attaches to the assets of Ameren Energy in connection therewith, Client Companies shall immediately upon such entry or attachment pay the judgment in full or discharge any such lien unless, at its expense and direction, appeal shall be taken under which the execution of the judgment or satisfaction of the lien is stayed. If and when a final and unappealable judgment is rendered against Ameren Energy in any such action, Client Companies shall forthwith pay such judgment or 5 discharge such lien prior to the time that Ameren Energy would be legally held to do so. 6. Miscellaneous. ------------- This Agreement shall be binding upon the successors and assigns of the Parties hereto, provided that Ameren Energy shall not be entitled to assign or subcontract out any of its obligations under this Agreement without the prior written approval of Client Companies. This Agreement may not be modified or amended in any respect except in writing executed by the Parties hereto. This Agreement shall be construed and enforced under and in accordance with the laws of the State of Missouri. This Agreement may be executed in counterparts, each one of which when fully executed shall be deemed to have the same dignity, force and effect as if the original. No provision of this Agreement shall be deemed waived nor breach of this Agreement consented to unless such waiver or consent is set forth in writing and executed by the Party hereto making such waiver or consent. IN WITNESS WHEREOF, the Parties hereto have caused this Agreement to be executed by their duly authorized representatives as of the day and year first above written. AMEREN ENERGY, INC. /s/ James F. Whitesides ------------------------------- By: James F. Whitesides ---------------------------- Title: President ------------------------- Date Executed: 4/27/00 ----------------- 6 AMEREN ENERGY MARKETING COMPANY /s/ James F. Whitesides ---------------------------------- By: James F. Whitesides -------------------------------- Title: President ----------------------------- Date Executed: 4/27/00 --------------------- AMEREN ENERGY GENERATING COMPANY /s/ R. Alan Kelley ----------------------------------- By: R. Alan Kelley -------------------------------- Title: Senior Vice President ----------------------------- Date Executed: 4/27/00 --------------------- UNION ELECTRIC COMPANY /s/ Jerre E. Birdsong ----------------------------------- By: Jerre E. Birdsong -------------------------------- Title: Treasurer ----------------------------- Date Executed: 4/27/00 --------------------- 7