EXHIBIT 10.28 THIRD AMENDMENT TO CREDIT AGREEMENT THIRD AMENDMENT TO CREDIT AGREEMENT (this "Third Amendment"), dated as of October 29, 1999 (the "Effective Date") among Miller Oil Corporation, a corporation formed under the laws of the State of Michigan (the "Borrower"), Miller Exploration Company (the "Parent"), each of the lenders that is a signatory, or which becomes a signatory, to the Credit Agreement referred to below (individually, together with its successors and assigns, a "Lender" and collectively, the "Lenders") and Bank of Montreal, a foreign bank formed under the laws of Canada in its individual capacity as a Lender and as agent for Lenders under the Credit Agreement referred to below (in its capacity as agent, together with its successors and assigns in such capacity, the "Agent"). RECITALS WHEREAS, the Borrower, the Parent, the Lenders and the Agent are parties to that certain Credit Agreement, dated as of February 9, 1998, as amended by that certain First Amendment to Credit Agreement, dated as of June 24, 1998 and as amended by that certain Second Amendment to Credit Agreement dated as of April 14, 1999 (as so amended, the "Credit Agreement"); and WHEREAS, the Borrower has advised the Lenders and the Agent that it desires to amend certain provisions of the Credit Agreement, and the Borrower has requested that the Lenders and the Agent agree to amend certain provisions of the Credit Agreement; and WHEREAS, the Lenders and the Agent have agreed to so amend certain provisions of the Credit Agreement upon the terms and subject to the conditions and limitations of this Third Amendment; NOW, THEREFORE, in consideration of the premises, covenants and agreements contained herein, the parties hereto hereby agrees as follows: Section 1. Definitions. Capitalized terms used and not otherwise defined herein are used with the meanings ascribed thereto in the Credit Agreement. The following capitalized terms shall have the following respective meanings when used herein: A. "Lending Relationship" shall refer to the Credit Agreement and the other Loan Documents, including, without limitation, this Third Amendment, together with any and all negotiations, discussions, acts, omissions, renewals, extensions, and other agreements or events related to the Credit Agreement and such other Loan Documents, the parties' obligations thereunder and the transactions contemplated thereby, including, without limitation, any such negotiations, discussions, acts, omissions, renewals, extensions, other agreements or events that (a) occurred prior to the date hereof, (b) may occur on the date hereof, or (c) occurred prior to the execution of this Third Amendment and the instruments and documents executed and delivered in connection herewith or relating hereto. B. "Supplemental Mortgages" shall mean, collectively, all those mortgages and supplements to mortgages necessary to grant to the Agent for the benefit of the Lenders a first priority perfected Lien on the Oil and Gas Properties owned by the Parent, the Borrower or any Subsidiary including those Oil and Gas Properties acquired by the Parent, the Borrower or any Subsidiary after February 9, 1998, and including without limitation, those properties listed on Schedule III hereto and those properties located in the State of Montana, all such mortgages and supplements to mortgages to be delivered within thirty (30) days of the date hereof in accordance with Section 7. C. "Released Claims" shall mean any and all claims (including without limitation any liabilities, damages, demands and causes of action arising therefrom), whether (a) at law or in equity, (b) on the alleged commission of a tort, (c) on the alleged breach (or anticipatory breach or repudiation) of any contract, duty, or warranty (whether oral or written, express or implied), (d) on the alleged violation of any statute, tariff, or regulation (whether promulgated by the United States, any state thereof, any foreign state or country, or any other governmental agency or entity, wherever located), or (e) on any other factual, legal or equitable theory, including, without limitation, any claim for damages of any type or nature, for injunctive or other relief, for attorneys' fees, interest or any other liability whatsoever on any theory, including without limitation any loss, cost or damage in connection with or based upon "lender liability", unfair dealing, duress, coercion, control or undue influence, extortion or commercial bribery, breach of an implied covenant or duty of good faith and fair dealing, material misrepresentation or omission, overreaching, unconscionability, conflict of interest, bad faith, malpractice, disparate bargaining position, detrimental reliance, promissory estoppel, estoppel by deed, waiver, laches, or any other equitable theory, equitable subordination, breach of fiduciary duty or any other duty, or tortious inducement to commit such breach, tortious interference with contract or prospective business relations, negligent performance of contractual obligations, or other theories of negligence, negligent or intentional infliction of emotional distress, slander, libel, other defamation, fraudulent transfer, conversion, trespass to (or clouding the title of) property, usury, violations of the Racketeer Influenced and Corrupt Organizations Act, deceptive trade practices, conspiracy, or any theory of liability as partners or joint venturers, that any Releasing Party may have as of the date hereof against any Released Party with respect to the Lending Relationship. D. "Released Party" shall mean each of the Agent, the Lenders and their respective predecessors, successors, assigns, directors, officers, partners, employees, agents, attorneys, principals and Affiliates and all other Persons liable or who might be claimed to be liable on their behalf (collectively, the "Released Parties"). 2 E. "Releasing Party" shall mean each of the Borrower and the Guarantors and their respective predecessors, successors, assigns, directors, officers, partners, employees, agents, attorneys, principals, Affiliates and all other Persons who might have a claim against any Released Party (collectively, the "Releasing Parties"). Section 2. Amendments to Credit Agreement. The Credit Agreement is amended hereby as follows: A. Section 1.02 is amended hereby: (i) by inserting the reference "and the Third Amendment" after the reference "Second Amendment" in the definition of the term "Agreement"; (ii) by deleting the references "October 15, 1999" and "$37,000,000" in the definition of "Aggregate Maximum Credit Amounts" and substituting the references "April 15, 2000" and "$25,468,000". (iii) by deleting the reference "(i) the sixth anniversary of the Closing Date," in the definition of the term "Final Maturity Date" and substituting the following therefor "(i) January 1, 2001,". (iv) by adding the following definition where alphabetically appropriate: "Third Amendment Effective Date" shall mean the "Effective Date" as such term is defined in the Third Amendment. B. Section 2.07 of the Credit Agreement is amended hereby as follows: (i) by deleting subsection (b)(i) in its entirety and substituting therefor the following new subsection (b)(i): "(i) The Borrower shall make prepayments as set forth below: A. The Borrower shall prepay the Loans as follows: (1) On or before October 31, 1999, after application of any prepayments made pursuant to subsection C. below, the amount of $750,000; (2) On or before November 30, 1999, after application of any prepayments made pursuant to subsection C. below, the amount of $750,000; 3 (3) On or before December 31, 1999, after application of any prepayments made pursuant to subsection C. below, the amount of $750,000; (4) On or before January 31, 2000, after application of any prepayments made pursuant to subsection C. below, the amount of $4,000,000; and (5) On or before February 29, 2000, after application of any prepayments made pursuant to subsection C. below, the amount of $750,000; B. In addition to the prepayments required by subsections 2.07(b)(i)A. and C., upon any Transfer of Property that would be included in the Borrowing Base, the Borrower shall prepay the Loans in an amount equal to 100% of the net cash proceeds of any such Transfer, and any net cash proceeds in excess of the value attributable to such Property in the Borrowing Base determined by the Agent in its sole discretion at the time of the Transfer shall be credited against the prepayments required under subsection 2.07(b)(i)(A); C. Upon any Transfer of Property that would not be included in the Borrowing Base, the Borrower shall prepay the Loans in an amount equal to 100% of the net cash proceeds of any such Transfer, which prepayments shall be credited against the prepayments required under subsection 2.07(b)(i)(A); D. The entire amount of any prepayment made pursuant to this subsection shall be applied to reduce the Aggregate Maximum Credit Amounts pro rata to each Lender based on its Percentage Share." C. Section 2.08 of the Credit Agreement is amended hereby by as follows: (i) by deleting the reference "October 15, 1999" in subsection (d) and substituting therefor the reference "April 15, 2000"; and (ii) by deleting the first sentence of subsection (d) in its entirety and substituting the following therefor: "On April 15, 2000 (or such earlier time as the Borrower shall request in writing to the Agent, provided that the Borrower timely delivers a Reserve Report as required by Section 8.07 hereof) and, so long as any of the 4 Commitments are in effect and until payment in full of all Loans hereunder, on or around the first Business Day of each May and November, commencing November, 2000 (each being a "Scheduled Redetermination Date"), the Lenders shall redetermine the amount of the Borrowing Base in accordance with Section 2.08(b)." D. Section 8.07 of the Credit Agreement is amended hereby as follows: (i) by deleting the first sentence of subsection (a) in its entirety and substituting the following therefor: "On April 1, 2000 (or, if the Borrower requests a Borrowing Base redetermination prior to April 15, 2000 in accordance with Section 2.08 hereof, not less than 15 days prior to the date of such redetermination) and on or before each November 1 and April 1 thereafter, commencing November 1, 2000, the Borrower shall furnish to the Agent a Reserve Report." E. Section 9.12 of the Credit Agreement is amended hereby by deleting the reference "December 31, 1999" and substituting the reference "October 1, 2000." F. Section 9.14 of the Credit Agreement is amended hereby by deleting the reference "$24,000,000" and substituting the reference "$20,000,000." Section 3. Covenants. A. Covenants of the Borrower and the Parent. The Borrower or the Parent, as the case may be, covenants and agrees that during the period from the Third Amendment Effective Date through and including April 15, 2000 (or, if earlier, the date of the next redetermination of the Borrowing Base in accordance with Section 2.08(d) of the Credit Agreement as amended hereby): (i) Every two weeks the Parent shall deliver cash budgets in form and substance reasonably satisfactory to the Agent and cash flow statements in form and substance reasonably satisfactory to the Agent with variance analysis to budget (including accounts receivables and accounts payables reporting) not later than the Friday following the last week to which such budgets and statements relate. (ii) The Borrower shall not spud any wells or conduct any other drilling operations (other than with respect to wells identified on Schedule II hereto and routine workovers normally expensed in accordance with past practice) without the prior written consent of the Agent and the Lenders, and shall not, without the prior written consent of the Agent and the Lenders, use any amounts to acquire acreage, leases, seismic data, or for any drilling costs and expenses other than to acquire, extend or renew 5 the Leases identified on Schedule I hereto or to pay the drilling costs or expenses identified on Schedule II hereto. (iii) The Borrower shall use its best efforts to raise capital, whether through debt, equity or consummation of asset sales to achieve Borrowing Base compliance, provided that the Lenders shall not require proceeds raised through debt or equity offerings to be used for debt prepayments. (iv) The Borrower shall provide to the Agent from time to time upon request by the Agent the certificate of a Responsible Officer of the Borrower stating that, except as disclosed in a schedule thereto, the Borrower has not received written notice that any mechanics' liens have been filed or will be filed on the Mortgaged Properties; provided that mere receipt of an invoice for services rendered shall not constitute written notice that a mechanics' lien will be filed. B. The Lenders and the Agent Covenants. Each of the Lenders and the Agent, as the case may be, covenants and agrees that during the period from the Third Amendment Effective Date through and including April 15, 2000 (or, if earlier, the date of the next determination of the Borrowing Base in accordance with Section 2.08(d) of the Credit Agreement as amended hereby): (i) the Agent will release any Lien that it may have on assets of the Borrower sold by the Borrower in one or more arms length transactions for fair value by the Borrower in accordance with the terms of the Credit Agreement as amended hereby, the net cash proceeds of which sales are paid to the Bank pursuant to Section 2.07(b)(i) of the Credit Agreement as amended hereby. Section 4. Conditions Precedent. This Third Amendment shall become binding upon receipt by the Agent of the following documents and satisfaction of the other conditions provided in this Section 4, each of which must be satisfactory to the Agent in form and substance: A. counterparts of this Amendment executed by the Borrower, the Agent and the Lenders; B. certificates of the Secretary or an Assistant Secretary of the Borrower and the Guarantor setting forth for each of them (i) the resolutions of its board of directors or managers (or if such Guarantor is a partnership, resolutions of the general partner of such partnership), as applicable, with respect to the authorization to execute and deliver this Amendment and consummate the transactions contemplated hereby; (ii) the Responsible Officer of such entity authorized to sign this Amendment, and (iii) the signature of such authorized Responsible Officer of such entity; C. a Consent and Acknowledgement executed by each of the Guarantors; 6 D. an opinion of counsel to Borrower substantially in the form attached hereto as Exhibit A; E. payment to the Agent for the ratable benefit of the Lenders of all accrued and unpaid Interest outstanding under the Credit Agreement and the Notes; F. payment of the fees and expenses of the Agent and the Lenders including the payment of the Amendment Fee provided in Section 8.A. of the Second Amendment; and G. such other documents as the Agent may reasonably request. Section 5. Representations and Warranties. A. The Borrower hereby reaffirms that the representations and warranties made by the Borrower and the Parent in the Credit Agreement were true and correct when made and, except as to be described in writing to the Agent as of the date hereof, are true and correct as though made on and as of the date hereof, and further, the Borrower represents that, (i) as of the date hereof, no Default or Material Adverse Effect has occurred and is continuing except as previously disclosed to the Agent in writing or as set forth in Schedule IV hereto; (ii) neither the Borrower, the Parent nor any Subsidiary has acquired any additional Oil and Gas Properties since April 14, 1999 except as identified on Schedule III hereto; and (iii) the execution, delivery and performance by the Borrower or any Guarantor of this Third Amendment and the other Loan Documents and all instruments and documents to be delivered by the Borrower or such Guarantor, to the extent a party thereto, hereunder and thereunder and the creation of all Liens provided for herein and therein: (a) are within the Borrower's or such Guarantor's corporate power; (b) have been duly authorized by all necessary or proper corporate action, including the consent of stockholders, members and/or partners therein or thereof; (c) are not in contravention of any provision of the Borrower's or such Guarantor's certificate of incorporation, bylaws or similar organizational and/or governing documents; (d) will not violate (1) any law or regulation or (2) any order or decree of any court or governmental instrumentality; (e) will not conflict with or result in the breach or termination of, constitute a default under or accelerate any performance required by, any indenture, mortgage, deed of trust, lease, agreement or other instrument to which the Borrower or such Guarantor is a party or by which the Borrower or such Guarantor or any of their respective property is bound; (f) will not result in the creation or imposition of any Lien upon any of the property of the Borrower or such Guarantor other than those in favor of the Agent pursuant to the terms of this Third Amendment and the other Loan Documents 7 to be delivered in connection herewith; and (g) do not require the consent or approval of any governmental body, agency, authority or any other Person that has not been duly obtained, made or complied with prior to the date hereof. At or prior to the date hereof, each of this Third Amendment and the other Loan Documents to be delivered in connection herewith shall have been duly executed and delivered for the benefit of or on behalf of the Borrower or such Guarantor, in each case to the extent a party thereto, and each shall then constitute a legal, valid and binding obligation of the Borrower or such Guarantor, enforceable against it in accordance with its terms. B. Each of the Borrower and such Guarantor further represents and warrants, for itself only that he or it (i) is executing this Third Amendment after consultation with counsel of his or its own choosing, (ii) has read and understands the release granted by Section 6 hereof, (iii) desires to execute this Third Amendment and (iv) has the requisite authority to enter into and be bound by this Third Amendment, including the release granted by Section 6 hereof. Section 6. Release. A. Each of the Releasing Parties desires and intends fully to compromise, release and settle any and all of the Released Claims; and each of the Releasing Parties hereby covenants, warrants and represents unto each of the Released Parties that such Releasing Party does hereby FOREVER RELEASE, ACQUIT, WAIVE AND DISCHARGE each of the Released Parties of and from the Released Claims and each of the Releasing Parties hereby declares the same FOREVER RELEASED, ACQUITTED, WAIVED, SETTLED AND DISCHARGED. This release is effective without regard to whether (i) such Released Claims are known or unknown, (ii) damages arising out of such Released Claims have yet accrued, (iii) such Released Claims arose collaterally, directly, derivatively, or otherwise between the parties hereto or (iv) an ordinary person in the same or similar circumstances would or would not, through the exercise of due care, have discovered such claims by the date of this Amendment. In connection with the foregoing release: B. The Borrower and each Guarantor represents and warrants that it has the full power and authority to perform the release granted in this Section 6 and that it has not in any manner made any assignment of any Released Claim to any third party. C. The release granted in this Section 6 will be effective upon execution of this Third Amendment by all of the parties hereto. D. Each party executing this Amendment understands and agrees that the release granted in this Section 6 is a full, final and complete release of the Released Claims and that such release may be pleaded as an absolute and final bar to any or all suits which may hereafter be filed or prosecuted by any one or more of the Releasing Parties or anyone claiming by, through or under any one or more of the Releasing Parties in respect of any of the matters released hereby, and that no recovery on account of the 8 Released Claims may hereafter be had from any of the Released Parties; and that the consideration given for such release is not an admission of liability or fault on the part of any of the Released Parties (it being the express intent of the parties hereto to obtain peace of mind and avoid the expense and uncertainty of potential litigation), and that none of the Releasing Parties or those claiming by, through or under any of them will ever claim that it is. E. The parties hereto acknowledge that the release granted by this Section 6 does not have any effect with respect to relationships between the Borrower and each Guarantor and the Lenders and the Agent other than in connection with the Lending Relationship. Section 7. Events of Default and Remedies. A. The occurrence of the following event (regardless of the reason therefor) shall constitute an "Event of Default" hereunder: (i) The Borrower shall fail to deliver within thirty (30) days after closing the Supplemental Mortgages and the other documents required under Section 8.09 of the Credit Agreement (including, without limitation, the legal opinion), granting to the Agent a first priority Lien interest (subject only to Excepted Liens) on the Borrower's, the Parent's, or any Subsidiary's interest in any additional Oil and Gas Property listed on Schedule III hereto. B. The occurrence and continuation of an Event of Default hereunder shall constitute an Event of Default under the Credit Agreement as amended hereby. Section 8. Payment of Fees and Expenses; Form of Payment. A. The Borrower agrees to pay to the Agent for the ratable benefit of the Lenders a fee (the "Amendment Fee") in an amount equal to two percent (2%) on the outstanding balance of the Loans as of April 15, 2000, payable on April 15, 2000. B. The Borrower agrees, whether or not the transactions contemplated hereby are consummated, to pay all reasonable expenses of the Agent and the Lenders (including, without limitation, all reasonable fees and disbursements of counsel and other outside consultants for the Agent and/or the Lenders) in connection with the negotiation, investigation, preparation, execution and delivery of, recording and filing of, preservation of rights under and enforcement of this Amendment and the other Loan Documents to be delivered in connection herewith. C. All payments to be made by the Borrower under this Amendment shall be made in Dollars, in immediately available funds, to the Agent at such account as the Agent shall specify by notice in accordance with Section 4.01 of the Credit Agreement. 9 Section 9. Limitations. The amendments set forth herein are limited precisely as written and shall not be deemed to (a) be a consent to, or waiver or modification of, any other term or condition of the Credit Agreement or any of the other Loan Documents, or (b) prejudice any right or rights that the Lenders or the Agent may have at any time under or in connection with the Credit Agreement as amended hereby or any of the other Loan Documents. Except as expressly supplemented, amended or modified hereby, the terms and provisions of the Credit Agreement or any other Loan Documents are and shall remain in full force and effect. In the event of a conflict between this Amendment and any of the foregoing documents, the terms of this Amendment shall be controlling. Section 10. Non-Reliance on Agent and Other Lenders. Each Lender acknowledges and agrees that it has, independently and without reliance on the Agent or any other Lender, and based on such documents and information as it has deemed appropriate, made its own decision to enter into this Amendment, and that it will, independently and without reliance upon the Agent or any other Lender, and based on such documents and information as it shall deem appropriate at the time, continue to make its own analysis and decisions in taking or not taking action under this Amendment or the Credit Agreement. The Agent shall not be required to keep itself informed as to the performance or observance by the Borrower of this Amendment or any other Loan Document or any other document referred to or provided for herein or therein or to inspect the properties or books of the Borrower. Except for notices, reports and other documents and information expressly required to be furnished to the Lenders by the Agent hereunder and under the Credit Agreement, the Agent shall not have any duty or responsibility to provide any Lender with any credit or other information concerning the affairs, financial condition or business of the Borrower (or any of its Affiliates) which may come into the possession of the Agent or any of its Affiliates. In this regard, each Lender acknowledges that Weil, Gotshal & Manges LLP is acting in this transaction as special counsel to the Agent only. Each Lender will consult with its own legal counsel to the extent that it deems necessary in connection with this Amendment and the matters contemplated herein. Section 11. Governing Law. This Amendment and the rights and obligations of the parties hereunder and under the Credit Agreement shall be construed in accordance with and be governed by the laws of the State of Texas and the United States of America. Section 12. Descriptive Headings, etc. The descriptive headings of the several Sections of this Amendment are inserted for convenience only and shall not be deemed to affect the meaning or construction of any of the provisions hereof. Section 13. Counterparts. This Amendment may be executed in any number of counterparts and by different parties on separate counterparts and all of such counterparts shall together constitute one and the same instrument. 10 IN WITNESS WHEREOF, the parties hereto have caused this Amendment to be executed as of the date first written above. NOTICE PURSUANT TO TEX. BUS. & COMM. CODE (Section)26.02 THIS AMENDMENT AND OTHER LOAN DOCUMENTS EXECUTED BY ANY OF THE PARTIES BEFORE OR SUBSTANTIALLY CONTEMPORANEOUSLY WITH THE EXECUTION HEREOF TOGETHER CONSTITUTE A WRITTEN LOAN AGREEMENT AND REPRESENT 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 AGREEMENT BETWEEN THE PARTIES. BORROWER: MILLER OIL CORPORATION By: /s/ Kelly E. Miller -------------------------------- Name: Kelly E. Miller ------------------------------ Title: President ----------------------------- PARENT: MILLER EXPLORATION COMPANY By: /s/ Kelly E. Miller -------------------------------- Name: Kelly E. Miller ------------------------------ Title: President & CEO ----------------------------- LENDER AND AGENT: BANK OF MONTREAL By: /s/ Thomas E. McGraw -------------------------------- Thomas E. McGraw Director