EXHIBIT 10.5 GUARANTY AGREEMENT by ST. MARY OPERATING COMPANY in favor of WACHOVIA BANK, NATIONAL ASSOCIATION, AS ADMINISTRATIVE AGENT January 27, 2003TABLE OF CONTENTS ----------------- Page ARTICLE 1 General Terms........................................................1 Section 1.1 Terms Defined Above........................................1 Section 1.2 Certain Definitions........................................1 Section 1.3 Credit Agreement Definitions...............................3 ARTICLE 2 The Guaranty.........................................................3 Section 2.1 Liabilities Guaranteed.....................................3 Section 2.2 Nature of Guaranty.........................................3 Section 2.3 Administrative Agent's Rights..............................4 Section 2.4 Guarantor's Waivers........................................4 Section 2.5 Maturity of Liabilities; Payment...........................4 Section 2.6 Administrative Agent's Expenses............................4 Section 2.7 Liability..................................................5 Section 2.8 Events and Circumstances Not Reducing or Discharging Guarantor's Obligations....................................5 Section 2.9 Right of Subrogation and Contribution......................7 ARTICLE 3 Representations and Warranties.......................................7 Section 3.1 By Guarantor...............................................7 Section 3.2 No Representation by Lenders...............................8 ARTICLE 4 Subordination of Indebtedness........................................8 Section 4.1 Subordination of All Guarantor Claims......................8 Section 4.2 Claims in Bankruptcy.......................................8 Section 4.3 Payments Held in Trust.....................................9 Section 4.4 Liens Subordinate..........................................9 Section 4.5 Notation of Records........................................9 ARTICLE 5 Miscellaneous........................................................9 Section 5.1 Successors and Assigns.....................................9 Section 5.2 Notices....................................................9 Section 5.3 Business and Financial Information........................10 Section 5.4 Choice of Law.............................................10 Section 5.5 Invalidity................................................10 SECTION 5.6 ENTIRE AGREEMENT..........................................10 -i- GUARANTY AGREEMENT ------------------ THIS GUARANTY AGREEMENT (this "Guaranty Agreement") made by the undersigned ------------------ ------------------ guarantor (hereinafter called "Guarantor"), is in favor of Wachovia Bank, --------- National Association, as Administrative Agent (the "Administrative Agent") for --------------------- the lenders (the "Lenders") signatory to the Credit Agreement defined below. ------- R E C I T A L S: ---------------- A. On even date herewith, St. Mary Land & Exploration Company, a Delaware corporation (hereinafter called "Borrower"), the Administrative Agent, -------- and the Lenders have entered into that certain Credit Agreement (as the same may be amended or supplemented from time to time, the "Credit Agreement"), whereby, ---------------- pursuant to the terms and conditions contained therein, the Lenders agreed to make loans to and extend credit on behalf of the Borrower; and B. One of the terms and conditions stated in the Credit Agreement for the making of the loans and extensions of credit described therein is the execution and delivery to the Administrative Agent for the benefit of the Lenders of this Guaranty Agreement; NOW, THEREFORE, (i) in order to comply with the terms and conditions of the Credit Agreement, (ii) to induce the Lenders, at any time or from time to time, to loan monies and extend credit, with or without security, to or for the account of Borrower in accordance with the terms of the Credit Agreement, (iii) at the special insistence and request of the Lenders, and (iv) for other good and valuable consideration, the receipt and sufficiency of which is hereby acknowledged, Guarantor hereby agrees as follows: ARTICLE 1 --------- General Terms ------------- Section 1.1 Terms Defined Above. As used in this Guaranty Agreement, the ------------------- terms "Administrative Agent", "Borrower", "Credit Agreement", "Guarantor" and "Lenders" shall have the meanings indicated above. Section 1.2 Certain Definitions. As used in this Guaranty Agreement, the -------------------- following terms shall have the following meanings, unless the context otherwise requires (terms defined in the singular shall have the same meanings when used in the plural and vice versa): ---- ----- "Contribution Obligation" shall mean an amount equal, at any time and from ------------------------ time to time and for each respective Subsidiary Guarantor, to the product of (i) its Contribution Percentage times (ii) the sum of all payments made previous to or at the time of calculation by all Subsidiary Guarantors in respect of the Liabilities, as a Subsidiary Guarantor (less the amount of any such payments previously returned to any Subsidiary Guarantor by operation of law or otherwise, but not including payments received by any Subsidiary Guarantor by way of its rights of subrogation and contribution under Section 2.9 of any other Guaranty Agreements); provided, however, such Contribution Obligation for any Subsidiary Guarantor shall in no event exceed such Subsidiary Guarantor's Maximum Guaranteed Amount, as defined in the respective Guaranty Agreement of such Subsidiary Guarantor. -1- "Contribution Percentage" shall mean for any Subsidiary Guarantor for any ------------------------ applicable date as of which such percentage is being determined, an amount equal to the quotient of (i) the Net Worth of such Subsidiary Guarantor as of such date, divided by (ii) the sum of the Net Worth of all the Subsidiary Guarantors as of such date. "Guarantor Claims" shall have the meaning indicated in Section 4.1 hereof. ---------------- "Guaranty Agreement" shall mean this Guaranty Agreement, and where the ------------------- context indicates, the "Guaranty Agreement" (as defined in the Credit Agreement) of any other Subsidiary Guarantor, as the same may from time to time be amended, modified or supplemented. "Liabilities" shall mean (a) any and all Indebtedness, obligations and ----------- liabilities of the Borrower pursuant to the Credit Agreement and any other Loan Document, including without limitation, the unpaid principal of and interest on the Notes, including without limitation, interest accruing subsequent to the filing of a petition or other action concerning bankruptcy or other similar proceeding; (b) any additional loans made by the Lenders to the Borrower; (c) payment of and performance of any and all present or future obligations of the Borrower to any Lender or any Affiliate of such Lender under any Swap Agreement between the Borrower and any Lender or any Affiliate of such Lender; (d) any and all other indebtedness, obligations and liabilities of any kind of the Borrower to the Lenders, now or hereafter existing, arising directly between the Borrower and the Lenders or acquired outright, as a participation, conditionally or as collateral security from another by the Lenders, absolute or contingent, joint and/or several, secured or unsecured, due or not due, arising by operation of law or otherwise, or direct or indirect, including indebtedness, obligations and liabilities to the Lenders of the Borrower as a member of any partnership, syndicate, association or other group, and whether incurred by the Borrower as principal, surety, endorser, guarantor, accommodation party or otherwise; and (e) all renewals, rearrangements, increases, extensions for any period, amendments or supplements in whole or in part of the Notes or any documents evidencing the above "Maximum Guaranteed Amount" shall mean, for the Guarantor, the greater of -------------------------- (i) the "reasonably equivalent value" or "fair consideration" (or equivalent concept) received by the Guarantor in exchange for the obligation incurred hereunder, within the meaning of any applicable state or federal fraudulent conveyance or transfer laws; or (ii) the lesser of (A) the maximum amount that will not render the Guarantor insolvent, or (B) the maximum amount that will not leave the Guarantor with any property deemed an unreasonably small capital. Clauses (A) and (B) are and shall be determined pursuant to and as of the appropriate date mandated by such applicable state or federal fraudulent conveyance or transfer laws and to the extent allowed by law take into account the rights to contribution and subrogation under Section 2.9 in each Guaranty Agreement so as to provide for the largest Maximum Guaranteed Amount possible. "Net Payments" shall mean an amount equal, at any time and from time to ------------- time and for each respective Subsidiary Guarantor, to the difference of (i) the sum of all payments made previous to or at the time of calculation by such Subsidiary Guarantor in respect of the Liabilities, as a Subsidiary Guarantor, and in respect of its obligations contained in this Guaranty Agreement, less (ii) the sum of all such payments previously returned to such Subsidiary Guarantor by operation of law or otherwise and including payments received by such Subsidiary Guarantor by way of its rights of subrogation and contribution -2- under Section 2.9 of any other Guaranty Agreements. "Net Worth" shall mean for any Subsidiary Guarantor, determined in ---------- accordance with GAAP and calculated on and as of any applicable date on which such amount is being determined, the difference between (i) the sum of all such Subsidiary Guarantor's property, at a fair valuation and as of such date, minus (ii) the sum of all such Subsidiary Guarantor's debts, at a fair valuation and as of such date, excluding the Liabilities. "Subsidiary Guarantors" shall mean the Subsidiaries or other Persons party ---------------------- to a Guaranty Agreement, including the Guarantor. Section 1.3 Credit Agreement Definitions. Unless otherwise defined herein, ---------------------------- all terms beginning with a capital letter which are defined in the Credit Agreement shall have the same meanings herein as therein. ARTICLE 2 --------- The Guaranty ------------ Section 2.1 Liabilities Guaranteed. Guarantor hereby irrevocably and ----------------------- unconditionally guarantees the prompt payment of the Liabilities when due, whether at maturity or otherwise; provided, however, that, notwithstanding anything herein or in any other Loan Document to the contrary, the maximum liability of Guarantor hereunder shall in no event exceed the Maximum Guaranteed Amount. Section 2.2 Nature of Guaranty. This Guaranty Agreement is an absolute, ------------------- irrevocable, completed and continuing guaranty of payment and not a guaranty of collection, and no notice of the Liabilities or any extension of credit already or hereafter contracted by or extended to Borrower need be given to Guarantor. This Guaranty Agreement may not be revoked by Guarantor and shall continue to be effective with respect to debt under the Liabilities arising or created after any attempted revocation by Guarantor and shall remain in full force and effect until the Liabilities are paid in full and the Commitments are terminated, notwithstanding that from time to time prior thereto no Liabilities may be outstanding. Borrower and the Lenders may modify, alter, rearrange, extend for any period and/or renew from time to time, the Liabilities, and the Lenders may waive any Default or Events of Default without notice to the Guarantor and in such event Guarantor will remain fully bound hereunder on the Liabilities. This Guaranty Agreement shall continue to be effective or be reinstated, as the case may be, if at any time any payment of the Liabilities is rescinded or must otherwise be returned by any of the Lenders upon the insolvency, bankruptcy or reorganization of Borrower or otherwise, all as though such payment had not been made. This Guaranty Agreement may be enforced by the Administrative Agent and any subsequent holder of any of the Liabilities and shall not be discharged by the assignment or negotiation of all or part of the Liabilities. Guarantor hereby expressly waives presentment, demand, notice of non-payment, protest and notice of protest and dishonor, notice of Default or Event of Default, notice of intent to accelerate the maturity and notice of acceleration of the maturity and any other notice in connection with the Liabilities, and also notice of acceptance of this Guaranty Agreement, acceptance on the part of the Lenders -3- being conclusively presumed by the Lenders' request for this Guaranty Agreement and delivery of the same to the Administrative Agent. Section 2.3 Administrative Agent's Rights. Guarantor authorizes the ------------------------------- Administrative Agent, without notice or demand and without affecting Guarantor's liability hereunder, to obtain a guaranty of the Liabilities from any one or more Persons and at any time or times to enforce, waive, rearrange, modify, limit or release any of such other Persons from their obligations under such guaranties. Section 2.4 Guarantor's Waivers. ------------------- (a) General. Guarantor waives any right to require any of the Lenders ------- to (i) proceed against Borrower or any other person liable on the Liabilities, (ii) enforce any of their rights against any other guarantor of the Liabilities including but not limited to the Subsidiary Guarantors (iii) proceed or enforce any of their rights against or exhaust any security given to secure the Liabilities (iv) have Borrower joined with Guarantor in any suit arising out of this Guaranty Agreement and/or the Liabilities, or (v) pursue any other remedy in the Lenders' powers whatsoever. The Lenders shall not be required to mitigate damages or take any action to reduce, collect or enforce the Liabilities. Guarantor waives any defense arising by reason of any disability, lack of corporate authority or power, or other defense of Borrower or any other guarantor of the Liabilities, and shall remain liable hereon regardless of whether Borrower or any other guarantor be found not liable thereon for any reason. Whether and when to exercise any of the remedies of the Lenders under any of the Loan Documents shall be in the sole and absolute discretion of the Administrative Agent, and no delay by the Administrative Agent in enforcing any remedy, including delay in conducting a foreclosure sale, shall be a defense to the Guarantor's liability under this Guaranty Agreement. To the extent allowed by applicable law, the Guarantor hereby waives any good faith duty on the part of the Administrative Agent in exercising any remedies provided in the Loan Documents. (b) Subrogation. Until the Liabilities have been paid in full, the ----------- Guarantor waives all rights of subrogation or reimbursement against the Borrower, whether arising by contract or operation of law (including, without limitation, any such right arising under any federal or state bankruptcy or insolvency laws) and waives any right to enforce any remedy which the Lenders now have or may hereafter have against the Borrower, and waives any benefit or any right to participate in any security now or hereafter held by the Administrative Agent or any Lender. Section 2.5 Maturity of Liabilities; Payment. Guarantor agrees that if the --------------------------------- maturity of any of the Liabilities is accelerated by bankruptcy or otherwise, such maturity shall also be deemed accelerated for the purpose of this Guaranty Agreement without demand or notice to Guarantor. Guarantor will, forthwith upon notice from the Administrative Agent, pay to the Administrative Agent the amount due and unpaid by Borrower and guaranteed hereby. The failure of the Administrative Agent to give this notice shall not in any way release Guarantor hereunder. Section 2.6 Administrative Agent's Expenses. If Guarantor fails to pay the -------------------------------- Liabilities after notice from the Administrative Agent of Borrower's failure to -4- pay any Liabilities when due, and if the Administrative Agent obtains the services of an attorney for collection of amounts owing by Guarantor hereunder, or obtaining advice of counsel in respect of any aspect of this Guaranty Agreement, or if suit is filed to enforce this Guaranty Agreement, or if proceedings are had in any bankruptcy, probate, receivership or other judicial proceedings for the establishment or collection of any amount owing by Guarantor hereunder, or if any amount owing by Guarantor hereunder is collected through such proceedings, Guarantor agrees to pay to the Administrative Agent the Administrative Agent's reasonable attorneys' fees. Section 2.7 Liability. It is expressly agreed that the liability of the --------- Guarantor for the payment of the Liabilities guaranteed hereby shall be primary and not secondary. Section 2.8 Events and Circumstances Not Reducing or Discharging ------------------------------------------------------------- Guarantor's Obligations. Guarantor hereby consents and agrees to each of the - ------------------------ following to the fullest extent permitted by law, and agrees that Guarantor's obligations under this Guaranty Agreement shall not be released, diminished, impaired, reduced or adversely affected by any of the following, and waives any rights (including without limitation rights to notice) which Guarantor might otherwise have as a result of or in connection with any of the following: (a) Modifications, etc. Any renewal, extension, modification, -------------------- increase, decrease, alteration or rearrangement of all or any part of the Liabilities, or of the Notes, any Loan Document or the Credit Agreement or any instrument executed in connection therewith, or any contract or understanding between Borrower and any of the Lenders, or any other Person, pertaining to the Liabilities. (b) Adjustment, etc. Any adjustment, indulgence, forbearance or ---------------- compromise that might be granted or given by any of the Lenders to Borrower or Guarantor or any Person liable on the Liabilities. (c) Condition of Borrower or Guarantor. The insolvency, bankruptcy ----------------------------------- arrangement, adjustment, composition, liquidation, disability, dissolution, death or lack of power of Borrower or Guarantor or any other Person at any time liable for the payment of all or part of the Liabilities; or any dissolution of Borrower or Guarantor, or any sale, lease or transfer of any or all of the assets of Borrower or Guarantor, or any changes in the shareholders, partners, or members of Borrower or Guarantor; or any reorganization of Borrower or Guarantor. (d) Invalidity of Liabilities. The invalidity, illegality or --------------------------- unenforceability of all or any part of the Liabilities, or any document or agreement executed in connection with the Liabilities, for any reason whatsoever, including without limitation the fact that the Liabilities, or any part thereof, exceed the amount permitted by law, the act of creating the Liabilities or any part thereof is ultra vires, the officers or representatives ----- ----- executing the documents or otherwise creating the Liabilities acted in excess of their authority, the Liabilities violate applicable usury laws, the Borrower has valid defenses, claims or offsets (whether at law, in equity or by agreement) which render the Liabilities wholly or partially uncollectible from Borrower, the creation, performance or repayment of the Liabilities (or the execution, delivery and performance of any document or instrument representing part of the Liabilities or executed in connection with the Liabilities, or given to secure the repayment of the Liabilities) is illegal, uncollectible, legally impossible or unenforceable, or the Credit Agreement or other documents or instruments -5- pertaining to the Liabilities have been forged or otherwise are irregular or not genuine or authentic. (e) Release of Obligors. Any full or partial release of the liability ------------------- of Borrower on the Liabilities or any part thereof, of any co-guarantors, or any other Person now or hereafter liable, whether directly or indirectly, jointly, severally, or jointly and severally, to pay, perform, guarantee or assure the payment of the Liabilities or any part thereof, it being recognized, acknowledged and agreed by Guarantor that Guarantor may be required to pay the Liabilities in full without assistance or support of any other Person, and Guarantor has not been induced to enter into this Guaranty Agreement on the basis of a contemplation, belief, understanding or agreement that other parties other than the Borrower will be liable to perform the Liabilities, or the Lenders will look to other parties to perform the Liabilities. (f) Other Security. The taking or accepting of any other security, --------------- collateral or guaranty, or other assurance of payment, for all or any part of the Liabilities. (g) Release of Collateral, etc. Any release, surrender, exchange, ---------------------------- subordination, deterioration, waste, loss or impairment (including without limitation negligent, willful, unreasonable or unjustifiable impairment) of any collateral, property or security, at any time existing in connection with, or assuring or securing payment of, all or any part of the Liabilities. (h) Care and Diligence. The failure of the Lenders or any other Person ------------------ to exercise diligence or reasonable care in the preservation, protection, enforcement, sale or other handling or treatment of all or any part of such collateral, property or security; provided, however, that Lenders shall act in a -------- ------- "commercially reasonable" manner as required by applicable provisions of Article 9 of the Uniform Commercial Code as presently in effect in the State of Texas when exercising their rights under that certain Pledge and Security Agreement by and between Borrower and Administrative Agent of even date herewith. (i) Status of Liens. The fact that any collateral, security, security --------------- interest or lien contemplated or intended to be given, created or granted as security for the repayment of the Liabilities shall not be properly perfected or created, or shall prove to be unenforceable or subordinate to any other security interest or lien, it being recognized and agreed by Guarantor that Guarantor is not entering into this Guaranty Agreement in reliance on, or in contemplation of the benefits of, the validity, enforceability, collectability or value of any of the collateral for the Liabilities. (j) Payments Rescinded. Any payment by Borrower to the Lenders is held ------------------ to constitute a preference under the bankruptcy laws, or for any reason the Lenders are required to refund such payment or pay such amount to Borrower or someone else. (k) Other Actions Taken or Omitted. Any other action taken or omitted ------------------------------ to be taken with respect to the Credit Agreement, the Liabilities, or the security and collateral therefor, whether or not such action or omission prejudices Guarantor or increases the likelihood that Guarantor will be required to pay the Liabilities pursuant to the terms hereof; it being the unambiguous and unequivocal intention of Guarantor that Guarantor shall be obligated to pay -6- the Liabilities when due, notwithstanding any occurrence, circumstance, event, action, or omission whatsoever, whether contemplated or uncontemplated, and whether or not otherwise or particularly described herein, except for the full and final payment and satisfaction of the Liabilities. Section 2.9 Right of Subrogation and Contribution. If Guarantor makes a --------------------------------------- payment in respect of the Liabilities, it shall be subrogated to the rights of the Lenders against the Borrower with respect to such payment and shall have the rights of contribution against the other Subsidiary Guarantors set forth in Section 2.9 of any other Guaranty Agreements; provided that Guarantor shall not enforce its rights to any payment by way of subrogation or by exercising its rights of contribution or reimbursement or the right to participate in any security now or hereafter held by or for the benefit of the Lenders until all of the Liabilities have been paid in full. The Guarantor agrees that after all the Liabilities have been paid in full if its then current Net Payments are less than the amount of its then current Contribution Obligation, Guarantor shall pay to any other Subsidiary Guarantors an amount (together with any payments required of the other Subsidiary Guarantors by Section 2.9 of each other Guaranty Agreement) such that the Net Payments made by all Subsidiary Guarantors in respect of the Liabilities shall be shared among all of the Subsidiary Guarantors in a proportion equal to their respective Contribution Percentage; provided, however, Guarantor need not make any such payment if at the time such payment is to be made Guarantor is illiquid and not making such payment will not render any other Subsidiary Guarantor insolvent. ARTICLE 3 --------- Representations and Warranties ------------------------------ Section 3.1 By Guarantor. In order to induce the Lenders to accept this ------------- Guaranty Agreement, Guarantor represents and warrants to the Lenders (which representations and warranties will survive the creation of the Liabilities and any extension of credit thereunder) that: (a) Benefit to Guarantor. Guarantor's guaranty pursuant to this ---------------------- Guaranty Agreement reasonably may be expected to benefit, directly or indirectly, Guarantor. (b) Existence. Guarantor is a corporation duly organized, validly --------- existing and in good standing under the laws of the State of Colorado. (c) Power and Authorization. Guarantor is duly authorized and ------------------------- empowered to execute, deliver and perform this Guaranty Agreement and all necessary action on Guarantor's part requisite for the due execution, delivery and performance of this Guaranty Agreement has been duly and effectively taken. (d) Binding Obligations. This Guaranty Agreement constitutes valid and ------------------- binding obligations of Guarantor, enforceable in accordance with its terms, subject to applicable bankruptcy, insolvency, reorganization, moratorium or other laws affecting creditors' rights generally and subject to general principals of equity, regardless of whether considered in a proceeding in equity or at law. (e) Governmental Approvals; No Conflicts. This Guaranty Agreement (a) ------------------------------------ does not require any consent or approval of, registration or filing with, or any -7- other action by, any Governmental Authority, except such as have been obtained or made and are in full force and effect, (b) will not violate any applicable law or regulation or the charter, by-laws or other organizational documents of the Guarantor or any order of any Governmental Authority, (c) will not violate or result in a default under any indenture, agreement or other instrument binding upon the Guarantor or its assets, or give rise to a right thereunder to require any payment to be made by the Guarantor, and (d) will not result in the creation or imposition of any Lien on any asset of the Guarantor. (f) Solvency. The Guarantor hereby represents that (i) it is not -------- insolvent as of the date hereof and will not be rendered insolvent as a result of this Guaranty Agreement, (ii) it is not engaged in a business or a transaction, or about to engage in a business or a transaction, for which any property or assets remaining with such Guarantor thereafter is unreasonably small capital, and (iii) it does not intend to incur, or believe it will incur, debts that will be beyond its ability to pay as such debts mature. Section 3.2 No Representation by Lenders. Neither the Lenders nor any other ---------------------------- Person has made any representation, warranty or statement to the Guarantor in order to induce the Guarantor to execute this Guaranty Agreement. ARTICLE 4 --------- Subordination of Indebtedness ----------------------------- Section 4.1 Subordination of All Guarantor Claims. As used herein, the term ------------------------------------- "Guarantor Claims" shall mean all debts and liabilities of Borrower to Guarantor, whether such debts and liabilities now exist or are hereafter incurred or arise, or whether the obligation of Borrower thereon be direct, contingent, primary, secondary, several, joint and several, or otherwise, and irrespective of whether such debts or liabilities be evidenced by note, contract, open account, or otherwise, and irrespective of the person or persons in whose favor such debts or liabilities may, at their inception, have been, or may hereafter be created, or the manner in which they have been or may hereafter be acquired by Guarantor. The Guarantor Claims shall include without limitation all rights and claims of Guarantor against Borrower arising as a result of subrogation or otherwise as a result of Guarantor's payment of all or a portion of the Liabilities. During the continuance of any Event of Default, Guarantor shall not receive or collect, directly or indirectly, from Borrower or any other party any amount upon the Guarantor Claims. Section 4.2 Claims in Bankruptcy. In the event of receivership, bankruptcy, -------------------- reorganization, arrangement, debtor's relief, or other insolvency proceedings involving Borrower as debtor, the Lenders shall have the right to prove their claim in any proceeding, so as to establish their rights hereunder and receive directly from the receiver, trustee or other court custodian, dividends and payments which would otherwise be payable upon Guarantor Claims. In such event, Guarantor hereby assigns such dividends and payments to the Lenders. Should the Administrative Agent or any Lender receive, for application upon the Liabilities, any such dividend or payment which is otherwise payable to Guarantor, and which, as between Borrower and Guarantor, shall constitute a credit upon the Guarantor Claims, then upon payment in full of the Liabilities, Guarantor shall become subrogated to the rights of the Lenders to the extent that such payments to the Lenders on the Guarantor Claims have contributed toward the liquidation of the Liabilities, and such subrogation shall be with -8- respect to that portion of the Liabilities which would have been unpaid if the Administrative Agent or a Lender had not received dividends or payments upon the Guarantor Claims. Section 4.3 Payments Held in Trust. In the event that notwithstanding ----------------------- Sections 4.1 and 4.2 above, Guarantor should receive any funds, payments, claims or distributions which is prohibited by such Sections, Guarantor agrees to hold in trust for the Lenders an amount equal to the amount of all funds, payments, claims or distributions so received, and agrees that it shall have absolutely no dominion over the amount of such funds, payments, claims or distributions except to pay them promptly to the Administrative Agent, and Guarantor covenants promptly to pay the same to the Administrative Agent. Section 4.4 Liens Subordinate. Guarantor agrees that any liens, security ------------------ interests, judgment liens, charges or other encumbrances upon Borrower's assets securing payment of the Guarantor Claims shall be and remain inferior and subordinate to any liens, security interests, judgment liens, charges or other encumbrances upon Borrower's assets securing payment of the Liabilities, regardless of whether such encumbrances in favor of Guarantor, the Administrative Agent or the Lenders presently exist or are hereafter created or attach. Without the prior written consent of the Lenders, Guarantor shall not (a) exercise or enforce any creditor's right it may have against the Borrower, or (b) foreclose, repossess, sequester or otherwise take steps or institute any action or proceeding (judicial or otherwise, including without limitation the commencement of or joinder in any liquidation, bankruptcy, rearrangement, debtor's relief or insolvency proceeding) to enforce any lien, mortgages, deeds of trust, security interest, collateral rights, judgments or other encumbrances on assets of Borrower held by Guarantor. Section 4.5 Notation of Records. All promissory notes, or other instruments ------------------- evidencing the Guarantor Claims accepted by or held by Guarantor (if any) shall contain a specific written notice thereon that the indebtedness evidenced thereby is subordinated under the terms of this Guaranty Agreement. ARTICLE 5 --------- Miscellaneous ------------- Section 5.1 Successors and Assigns. This Guaranty Agreement is and shall be ---------------------- in every particular available to the successors and assigns of the Lenders and is and shall always be fully binding upon the legal representatives, heirs, successors and assigns of Guarantor, notwithstanding that some or all of the monies, the repayment of which this Guaranty Agreement applies, may be actually advanced after any bankruptcy, receivership, reorganization, death, disability or other event affecting Guarantor. Section 5.2 Notices. Any notice or demand to Guarantor under or in ------- connection with this Guaranty Agreement may be given and shall conclusively be deemed and considered to have been given and received in accordance with Section 12.02 of the Credit Agreement, addressed to Guarantor at the address on the signature page hereof or at such other address provided to the Administrative Agent in writing. -9- Section 5.3 Business and Financial Information. The Guarantor will promptly ---------------------------------- furnish to the Administrative Agent and the Lenders from time to time upon request such information regarding the business and affairs and financial condition of the Guarantor and its subsidiaries as the Administrative Agent and the Lenders may reasonably request. Section 5.4 Choice of Law. This Guaranty Agreement (including, but not ------------- limited to, the validity and enforceability hereof) shall be governed by, and construed in accordance with, the laws of the State of Texas. Section 5.5 Invalidity. In the event that any one or more of the provisions ---------- contained in this Guaranty Agreement shall, for any reason, be held invalid, illegal or unenforceable in any respect, such invalidity, illegality or unenforceability shall not affect any other provision of this Guaranty Agreement. Section 5.6 ENTIRE AGREEMENT. THIS WRITTEN GUARANTY AGREEMENT EMBODIES THE ---------------- ENTIRE AGREEMENT AND UNDERSTANDING BETWEEN THE LENDERS AND THE GUARANTOR AND SUPERSEDES ALL OTHER AGREEMENTS AND UNDERSTANDINGS BETWEEN SUCH PARTIES RELATING TO THE SUBJECT MATTER HEREOF AND THEREOF. THIS WRITTEN GUARANTY AGREEMENT REPRESENTS THE FINAL AGREEMENT BETWEEN THE PARTIES AND MAY NOT BE CONTRADICTED BY EVIDENCE OF PRIOR, CONTEMPORANEOUS, OR SUBSEQUENT ORAL AGREEMENTS OF THE PARTIES. THERE ARE NO UNWRITTEN ORAL AGREEMENTS BETWEEN THE PARTIES. [SIGNATURES BEGIN ON NEXT PAGE] -10- WITNESS THE EXECUTION HEREOF, effective as of the 27th day of January, 2003. ST. MARY OPERATING COMPANY By: /s/ MILAM RANDOLPH PHARO ---------------------------------------- Milam Randolph Pharo Vice President - Land & Legal Address: 7060 So. Yale, Suite 800 Tulsa, OK 74136-5741 with copy to: 1776 Lincoln Street, Suite 700 Denver, CO 80203 -11-