1 EXHIBIT 10.40 GUARANTY AGREEMENT BY [SEE SCHEDULE I HERETO] IN FAVOR OF CHASE BANK OF TEXAS, NATIONAL ASSOCIATION, AS TRUSTEE AUGUST 20, 1998 2 TABLE OF CONTENTS Page ---- ARTICLE 1 GENERAL TERMS Section 1.1 Terms Defined Above or in the Indenture.....................................2 Section 1.2 Certain Definitions.........................................................2 ARTICLE 2 THE GUARANTY Section 2.1 Liabilities Guaranteed......................................................4 Section 2.2 Nature of Guaranty..........................................................4 Section 2.3 Trustee's Rights............................................................4 Section 2.4 Guarantor's Waivers.........................................................5 Section 2.5 Maturity of Liabilities; Payment............................................5 Section 2.6 Trustee's, Agent's and Noteholders' Expenses................................5 Section 2.7 Liability...................................................................5 Section 2.8 Events and Circumstances Not Reducing or Discharging Guarantor's Obligations.....................................................6 Section 2.9 Right of Subrogation and Contribution.......................................7 ARTICLE 3 REPRESENTATIONS AND WARRANTIES Section 3.1 By Guarantor................................................................8 Section 3.2 No Representation by Noteholders............................................9 ARTICLE 4 SUBORDINATION OF INDEBTEDNESS Section 4.1 Subordination of All Guarantor Claims.......................................9 Section 4.2 Claims in Bankruptcy.......................................................10 Section 4.3 Payments Held in Trust.....................................................10 Section 4.4 Liens Subordinate..........................................................10 ARTICLE 5 MISCELLANEOUS Section 5.1 Successors and Assigns.....................................................11 Section 5.2 Notices....................................................................11 Section 5.3 Business and Financial Information.........................................11 Section 5.4 Construction...............................................................11 Section 5.5 Invalidity.................................................................11 Section 5.6 Subordination Agreement....................................................11 Section 5.7 ENTIRE AGREEMENT...........................................................12 -i- 3 GUARANTY AGREEMENT THIS GUARANTY AGREEMENT by [see Schedule I hereto] (hereinafter called "Guarantor"), is in favor of CHASE BANK OF TEXAS, NATIONAL ASSOCIATION in its capacity as trustee under the Indenture (as hereinafter defined), and each and every successor trustee under the Indenture (the "Trustee"), for the ratable benefit of Agent and the Noteholders (each as hereinafter defined). W I T N E S S E T H: A. Brigham Exploration Company, a Delaware corporation ("Borrower") has executed an Indenture, dated as of August 20, 1998, by and among the Borrower and Chase Bank of Texas, National Association (the "Indenture"), pursuant to which the Borrower has issued and will issue its Senior Subordinated Secured Notes in the aggregate face amount of $50,000,000, with final maturity on August 20, 2003 (such notes, as from time to time supplemented, amended or modified and all other notes given in substitution therefor or in modification, renewal or extension thereof, in whole or in part, being hereinafter called the "Notes"), to Joint Energy Development Investments II Limited Partnership, a Delaware limited partnership ("JEDI-II") and Enron Capital & Trade Resources Corp., a Delaware corporation ("ECT"). B. Brigham Oil & Gas, L.P., a Delaware limited partnership ("BOG") and Bank of Montreal, as Agent ("B-MO"; B-MO, together with any other parties from time to time constituting lenders under the Senior Credit Agreement (as hereinafter defined) are herein called the "Senior Lenders") have entered into that certain Credit Agreement dated as of January 28, 1998 as heretofore and hereafter amended (such agreement, as the same may from time to time be modified, extended, renewed, restated, replaced, amended or supplemented, being herein called the "Senior Credit Agreement") pursuant to which the Senior Lenders made and continue to make loans to BOG as evidenced by and to be evidenced by the notes in the aggregate original principal amount of $75,000,000 (such notes, as the same may from time to time be modified, extended, renewed, restated, amended, replaced or supplemented, being herein called the "BMO Notes"). C. The BMO Notes and all other obligations now or hereafter existing or to exist under the Senior Credit Agreement are guaranteed by various guaranties (such instruments, together with any others as may now exist or hereafter be executed pursuant to the Senior Credit Agreement, as any of the same may from time to time be amended, renewed, restated, modified or supplemented, being referred to herein collectively as the "Senior Guaranties"). D. In connection with the execution and delivery of the Indenture, JEDI-II, as agent (the "Agent"), JEDI-II, individually, ECT and B-MO, as agent for the Senior Lenders (the "Senior Loan Agent"), have executed an Intercreditor and Subordination Agreement dated as of August 20, 1998 (the "Subordination Agreement") in order to evidence the relative priorities and rights of the Senior -1- 4 Loan Agent and the Senior Lenders under the Senior Credit Agreement to the rights and obligations of the Agent and the Noteholders under the Indenture. E. The Guarantor will derive substantial benefit, both directly and indirectly, from the making of the loans under the Indenture and the Notes and has agreed to execute and deliver this Guaranty Agreement to the Trustee for the benefit of the Agent and the Noteholders. NOW, THEREFORE, (i) in order to comply with the terms and conditions of the Indenture, (ii) to induce the Noteholders to loan monies, with or without security to or for the account of Borrower in accordance with the terms of the Indenture, (iii) at the special insistence and request of the Noteholders, 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 or in the Indenture. As used in this Guaranty Agreement, the terms defined above shall have the meanings respectively assigned to them. Other capitalized terms which are defined in the Indenture but which are not defined herein shall have the same meanings as defined in the Indenture. Section 1.2 Certain Definitions. As used in this Guaranty Agreement, the following terms shall have the following meanings, unless the context otherwise requires: "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 (a) its Contribution Percentage times (b) 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 the 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. "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 (a) the Net Worth of such Subsidiary Guarantor as of such date, divided by (b) 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. -2- 5 "Guaranty Agreement" shall mean this Guaranty Agreement, and where the context indicates, the Guaranty Agreement of any other Subsidiary Guarantor, as the same may from time to time be amended or supplemented. "Liabilities" shall mean: (a) any and all indebtedness, obligations and liabilities of the Borrower to the Agent and the Noteholders pursuant to the Indenture, including without limitation, the unpaid principal of and interest on the Notes; (b) any additional Obligations (as defined in the Indenture) owing to the Agent and the Noteholders; and (c) 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 (a) 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 (b) the lesser of (i) the maximum amount that will not render the Guarantor insolvent, or (ii) the maximum amount that will not leave the Guarantor with any property deemed an unreasonably small capital. Clauses (i) and (ii) 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 (a) the sum of all payments made previous to or at the time of calculation by such Subsidiary Guarantor in respect to the Liabilities, as a Subsidiary Guarantor, and in respect of its obligations contained in this Guaranty Agreement, less (b) 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 under Section 2.9 of the other Guaranty Agreements. "Net Worth" shall mean for any Subsidiary Guarantor, calculated on and as of any applicable date on which such amount is being determined, the difference between (a) the sum of all such Subsidiary Guarantor's property, at a fair valuation and as of -3- 6 such date, minus (b) the sum of all such Subsidiary Guarantor's debts, at a fair valuation and as of such date, excluding the Liabilities. "Noteholders" shall mean the holders of the Notes from time to time, and the holders of any promissory note or notes given in substitution or replacement thereof, including, without limitation, pursuant to Section 2.06 of the Indenture. "Subsidiary Guarantors" shall mean the Guarantors as defined in the Indenture, including the Guarantor. 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 Basic 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. Borrower and the Noteholders may modify, alter, rearrange, extend for any period and/or renew from time to time, the Liabilities, and the Noteholders 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 Noteholders 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 Trustee, Agent and any 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, and also notice of acceptance of this Guaranty Agreement, acceptance on the part of the Noteholders being conclusively presumed by the Noteholders' request for this Guaranty Agreement and delivery of the same to the Trustee. Section 2.3 Trustee's Rights. Guarantor authorizes the Trustee, without notice or demand and without affecting Guarantor's liability hereunder, to take and hold security for the payment of this Guaranty Agreement and/or the Liabilities, and exchange, enforce, waive and release any such security; and to apply such security and direct the order or manner of sale thereof as the Trustee in -4- 7 its discretion may determine; and 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. Guarantor waives any right to require the Trustee, Agent or any of the Noteholders 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 (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 Trustee's, the Agent's or the Noteholders' powers whatsoever. Neither the Trustee, Agent, nor the Noteholders shall 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 Trustee, Agent or the Noteholders under any of the Basic Documents shall be in the sole and absolute discretion of the Trustee, acting on behalf of itself, the Agent and the Noteholders, and no delay by the Trustee in enforcing any remedy, including delay in conducting a foreclosure sale, shall be a defense to the Guarantor's liability under this Guaranty Agreement. 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 Trustee, pay to the Trustee the amount due and unpaid by Borrower and guaranteed hereby. The failure of the Trustee to give this notice shall not in any way release Guarantor hereunder. Section 2.6 Trustee's, Agent's and Noteholders' Expenses. If Guarantor fails to pay the Liabilities after notice from Trustee of Borrower's failure to pay any Liabilities at maturity, and if the Trustee, Agent or any Noteholder obtains the services of an attorney for collection of amounts owing by Guarantor hereunder, or obtaining advice of counsel in respect of any of their rights under 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 Trustee, Agent and Noteholder, the Trustee's, Agent's and Noteholder's respective 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 -5- 8 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, the Notes, the Indenture or the Basic Documents or any instrument executed in connection therewith, or any contract or understanding between Borrower and the Trustee, the Agent or any of the Noteholders, 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 Trustee, Agent or any Noteholder 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 Indenture, the Basic Documents or other documents or instruments 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 -6- 9 other than the Borrower will be liable to perform the Liabilities, or the Trustee, Agent or any of the Noteholders 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 Trustee, Agent, Noteholders 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; (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, collectibility or value of any of the collateral for the Liabilities; (j) Payments Rescinded. Any payment by Borrower to the Trustee, Agent or the Noteholders is held to constitute a preference under the bankruptcy laws, or for any reason the Trustee, Agent or the Noteholders are required to refund such payment or pay such amount to Borrower or someone else; or (k) Other Actions Taken or Omitted. Any other action taken or omitted to be taken with respect to the Basic Documents, 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 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 Trustee 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 the Subsidiary Guarantors' 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 Trustee, Agent or any of the Noteholders until the Liabilities have been paid -7- 10 in full. The Guarantor agrees that after all the Liabilities have been paid in full that if its then current Net Payments are less than the amount of its then current Contribution Obligation, Guarantor shall pay to the 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 proportion to their respective Contribution Percentage. ARTICLE 3 REPRESENTATIONS AND WARRANTIES Section 3.1 By Guarantor. In order to induce the Trustee, Agent and the Noteholders to accept this Guaranty Agreement, Guarantor represents and warrants to the Trustee, Agent and the Noteholders (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 duly organized, legally existing and in good standing under the laws of the state of its formation and is duly qualified as a foreign entity in all jurisdictions wherein the property owned or the business transacted by it makes such qualification necessary. (c) Power and Authorization. Guarantor is duly authorized and empowered to execute, deliver and perform this Guaranty Agreement and all corporate or other organizational 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 (except that enforcement may be subject to any applicable bankruptcy, insolvency or similar laws generally affecting the enforcement of creditors' rights or by general principles of equity). (e) No Consent. Guarantor's execution, delivery and performance of this Guaranty Agreement does not require the consent or approval of any other Person, including without limitation any regulatory authority or governmental body of the United States or any state thereof or any political subdivision of the United States or any state thereof. (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 business or a transaction, or about to engage in a business or a transaction, for which any property or assets remaining with such Guarantor 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. -8- 11 (g) Litigation. Except as disclosed to the Noteholders in Schedule 4.03 of the Securities Purchase Agreement, at the Closing Date there is no litigation, legal, administrative or arbitral proceeding, investigation or other action of any nature pending or, to the knowledge of the Guarantor threatened against the Guarantor or any of its Subsidiaries which involves the possibility of any judgment or liability against the Guarantor or any of its Subsidiaries not fully covered by insurance (except for normal deductibles), and which would be more likely than not to have a Material Adverse Effect. (h) No Breach. Neither the execution and delivery of this Guaranty Agreement, nor compliance with the terms and provisions hereof will conflict with or result in a breach of, or require any consent which has not been obtained as of the Closing Date under, the respective charter or by-laws or other constituent documents of the Guarantor or any of its Subsidiaries or any Governmental Requirement or any material agreement or instrument to which the Guarantor or any of its Subsidiaries is a party or by which it is bound or to which it or its Properties are subject, or constitute a default under any such agreement or instrument, or result in the creation or imposition of any Lien upon any of the material revenues or assets of the Guarantor or any of its Subsidiaries pursuant to the terms of any such agreement or instrument other than the Liens created by the Basic Documents. Section 3.2 No Representation by Noteholders. Neither the Trustee, the Agent or the Noteholders 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. If any Default exists and is continuing, and if the Trustee gives notice thereof to the Guarantor requiring the Guarantor Claims not be paid, then, for so long as any Default continues to exist, 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 Trustee, Agent and/or the Noteholders shall have the right to prove their claim in any -9- 12 proceeding, so as to establish its rights hereunder and receive directly from the receiver, trustee or other court custodian, dividends and payments which would otherwise be payable upon Guarantor Claims. Guarantor hereby assigns such dividends and payments to the Trustee, as trustee under the Indenture. Should the Trustee, Agent or any Noteholder 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 Trustee, Agent or the Noteholders, as applicable, to the extent that such payments to the Trustee, Agent or the Noteholders, as applicable, on the Guarantor Claims have contributed toward the liquidation of the Liabilities, and such subrogation shall be with respect to that proportion of the Liabilities which would have been unpaid if the Trustee, Agent or Noteholders, as applicable, 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 are prohibited by such Sections, Guarantor agrees to hold in trust for the Trustee, as trustee under the Indenture, 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 Trustee, and Guarantor covenants promptly to pay the same to the Trustee. 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 Trustee, Agent or the Noteholders presently exist or are hereafter created or attach. Without the prior written consent of the Trustee, 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. 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 Trustee, Agent and the Noteholders 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. The Trustee may resign, withdraw or be replaced -10- 13 as trustee under the Indenture, and upon any such event a new trustee may be appointed under the Indenture. In such event, Trustee shall be fully discharged thereafter from all liability therefor, and any new trustee under the Indenture shall be vested with all rights, powers and remedies of Trustee hereunder. In connection therewith, Guarantor will take whatever action is reasonably required in order to reaffirm its obligations under this Guaranty Agreement 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 13.05 of the Indenture, addressed to Guarantor at the address on the signature page hereof or at such other address provided to Trustee and Agent in writing. Section 5.3 Business and Financial Information. Subject to any applicable confidentiality agreements, the Guarantor will promptly furnish to Trustee, Agent and the Noteholders from time to time upon request such information regarding the business and affairs and financial condition of the Guarantor and its subsidiaries as the Trustee, Agent or the Noteholders may reasonably request. Section 5.4 Construction. This Guaranty Agreement is a contract made under and shall be construed in accordance with and governed by 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 Subordination Agreement. This Guaranty Agreement and the rights and remedies of Agent and the Noteholders under this Guaranty Agreement are subject to the terms and conditions of the Subordination Agreement. Section 5.7 ENTIRE AGREEMENT. THIS WRITTEN GUARANTY AGREEMENT EMBODIES THE ENTIRE AGREEMENT AND UNDERSTANDING AMONG THE AGENT, THE NOTEHOLDERS 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. -11- 14 WITNESS THE EXECUTION HEREOF, as of this the 20th day of August, 1998. [See Schedule I hereto] By: ------------------------------------ Name: Title: Address: ------------------------------- ------------------------------- ------------------------------- Telecopier No.: ------------------------ Telephone No.: ------------------------- Attention: ----------------------------- -12- 15 Schedule I Subsidiary Guarantors Brigham Oil & Gas, L.P. Brigham, Inc. Brigham Holdings I, LLC Brigham Holdings II, LLC Sooner Production, LLC DND Oil & Gas, L.P. -13-