# EXHIBIT 10.4

Execution Version

THIRD
AMENDMENT TO FOURTH AMENDED AND RESTATED CREDIT AGREEMENT

This
Third Amendment to Fourth Amended and Restated Credit Agreement (this
Amendment) dated as of August 28, 2002 (the Amendment
Effective Date), is by and among MAGNUM HUNTER RESOURCES, INC., a Nevada
corporation (the Borrower), each Bank (as defined in the Credit
Agreement referred to below), DEUTSCHE BANK TRUST COMPANY AMERICAS(formerly named
Bankers Trust Company), individually, as administrative agent (in such capacity, together
with its successors in such capacity, the Administrative Agent), as
collateral agent (in such capacity, together with its successors in such capacity, the
Collateral Agent), and as letter of credit issuing bank (in such
capacity, together with its successors in such capacity, the Issuer),
CIBC INC., individually and as syndication agent (in such capacity together with
its successors in such capacity, the Syndication Agent), and BNP
PARIBAS, a French bank acting through its Houston Agency, individually and as
documentation agent (in such capacity, together with its successors in such capacity, the
Documentation Agent).

R E C I T A L S:

WHEREAS,
the Borrower, each Bank then a party, the Administrative Agent, the Collateral Agent, the
Syndication Agent, the Documentation Agent (collectively, the Agents),
and the Issuer have heretofore entered into that certain Fourth Amended and Restated
Credit Agreement dated as of March 15, 2002, as amended by that certain First Amendment to
Fourth Amended and Restated Credit Agreement dated as of April 19, 2002, and by that
certain Second Amendment to Fourth Amended and Restated Credit Agreement dated as of July
3, 2002 (the Second Amendment), and as otherwise amended from time to time
prior to the Amendment Effective Date (the Credit Agreement), pursuant
to which the Banks have agreed to make revolving credit loans available to the Borrower
under the terms and provisions stated therein; and

WHEREAS,
Prize Energy Resources, L.P., a Delaware limited partnership (Prize), intends
to enter into a certain Agreement of Limited Partnership of Teal Hunter, L.P. (the
Partnership Agreement), between Prize, as general partner, and TIFD III-X,
Inc., a Delaware corporation, as limited partner (Limited Partner), pursuant
to which Prize and Limited Partner will form Teal Hunter, L.P., a Texas limited
partnership (Teal Hunter); and

WHEREAS,
in exchange for Prize receiving its general partnership interest in Teal Hunter, Prize is
required to contribute to Teal Hunter approximately $2,500,000 (but in no event more than
$3,000,000); and

WHEREAS,
Prize and Magnum Hunter Production, Inc. (Production), as sellers, and Teal
Hunter, as buyer, intend to enter into a certain Purchase and Sale Agreement on
substantially the same terms described in that certain Letter Agreement dated July 23,
2002, between Borrower and General Electric Capital Services Structured Finance Group,
Inc. (the Purchase Agreement), pursuant to which Teal Hunter will purchase
from Prize and Production certain Oil and Gas Properties described in the attached
Exhibit A (the Teal Hunter Properties) for cash of approximately
$48,000,000 (but in no event less than $44,000,00); and

WHEREAS,
subject to the terms and conditions of this Amendment, the Banks, the Agents and the
Issuer are willing to enter into this Amendment;

NOW,
THEREFORE, in consideration of the premises herein contained and other good and valuable
consideration, the receipt and sufficiency of which are hereby acknowledged, the parties
hereto agree as follows:

Section 1. Definitions.  Capitalized terms used in this Amendment,  to the extent not otherwise  defined herein,  shall have the
same meaning as in the Credit Agreement.

Section 2. Amendments to Credit Agreement.  The Credit Agreement is hereby amended as follows:

|(a) | From and after the Amendment Effective Date, the grid contained in the
          definition of Applicable Margin set forth in Section 1.1 of the
          Credit Agreement shall be, and hereby is, amended and restated in its entirety
          to provide as set forth on the attached Annex I. For the avoidance of doubt, the
          parties acknowledge and agree that the redetermination of the Borrowing Base
          pursuant to Section 5(a) of this Amendment shall constitute the 2002
          Mid-Year Redetermination as defined in the Second Amendment.
|--- | -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

|(b) | The definition of Monetization Transaction set forth in Section 1.1
          of the Credit Agreement is hereby amended and restated in its entirety to
          provide:
|--- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Monetization
Transaction means, collectively, the formation of Teal Hunter, L.P. pursuant to
that certain Agreement of Limited Partnership of Teal Hunter, L.P. and the sale of certain
Oil and Gas Properties pursuant to the terms of a certain Purchase and Sale Agreement
among Prize Energy Resources, L.P. and Magnum Hunter Production, Inc., as sellers, to Teal
Hunter, L.P., as buyer, all on substantially the same terms as described in that certain
Letter Agreement dated July 23, 2002, between Borrower and General Electric Capital
Services Structured Finance Group, Inc.

Section 3. Waiver of Certain
Credit Agreement Provisions. The Banks, the Agents and the Issuer hereby waive the
following provisions of the Credit Agreement on the terms set forth below; provided,
however, that the waiver of each such provision shall lapse and become null and void on
September 30, 2002, unless the Monetization Transaction shall have been consummated
on or prior to such date:

|(a) | Section 7.2.9 of the Credit Agreement, which restricts the Borrower and any of
          its Restricted Subsidiaries from selling, leasing, assigning, transferring, or
          otherwise disposing of any of its assets having a fair market value in excess of
          $25,000, (except as expressly permitted by Section 7.2.9 of the Credit
          Agreement), is hereby waived insofar as, and only insofar as, Prize and
          Production shall be permitted to sell, assign, transfer and convey the Teal
          Hunter Properties to Teal Hunter pursuant to the terms of the Purchase
          Agreement, provided that concurrently with such sale, assignment,
          transfer and conveyance, Prize and Production shall have received cash proceeds
          of the sale, assignment, transfer and conveyance of the Teal Hunter Properties
          in an aggregate amount of approximately $48,000,000 (but in any event not less
          than $44,000,000) (less any purchase price adjustments under the terms of the
          Purchase Agreement), and provided further that the Borrower shall,
          or shall cause Prize and Production to, make a payment to the Administrative
          Agent on behalf of the Banks in accordance with Section 3.1(f) of the
          Credit Agreement as if the sale, assignment, transfer and conveyance of the Teal
          Hunter Properties were a permitted disposition of assets under
          Section 7.2.9 of the Credit Agreement; and
|--- | -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Page 2

|(b) | Section 7.2.5 of the Credit Agreement, which restricts the Borrower and any of
          its Restricted Subsidiaries from making, incurring, or assuming any Investment
          in any other Person (except as expressly permitted by Section 7.2.5 of the
          Credit Agreement), is hereby waived insofar as, and only insofar as, Prize shall
          be permitted to contribute approximately $2,500,000 (but in no event more than
          $3,000,000) to Teal Hunter pursuant to the terms of the Partnership Agreement in
          consideration of Prizes receipt of a five percent (5%) general partnership
          interest in Teal Hunter; and
|--- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

|(c) | Section 7.2.10 of the Credit Agreement, which restricts the Borrower and any of
          its Restricted Subsidiaries from entering into, or causing, suffering or
          permitting to exist, any arrangement or contract with any Affiliate unless such
          arrangement or contract is fair and equitable to the Borrower or such Restricted
          Subsidiary, as the case may be, and is on terms no less favorable to the
          Borrower or such Restricted Subsidiary, as the case may be, than, and is
          otherwise, an arrangement or contract of the kind which would be entered into by
          a prudent Person in the position of the Borrower or such Restricted Subsidiary
          with a Person which is not one of its Affiliates (except as expressly permitted
          by Section 7.2.10 of the Credit Agreement), is hereby waived insofar as, and
          only insofar as, Prize and Production shall be permitted to enter into, and
          consummate the transactions described in, the Purchase Agreement, subject to the
          terms and conditions set forth in the foregoing clause (a) of this Section 3.
|--- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

| | The
parties hereto acknowledge and agree that the sale, transfer and conveyance of the Teal
Hunter Properties pursuant to the Purchase Agreement (as expressly permitted by the
foregoing clause (a) of this Section 3) shall not reduce the remaining availability of the
Borrower or its Restricted Subsidiaries to dispose of other assets in accordance with
Section 7.2.9(d) of the Credit Agreement during the current fiscal year to the extent
otherwise permitted by Section 7.2.9(d) after giving effect to the redetermination of the
Borrowing Base pursuant to Section 5(b) of this Amendment.
| | -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Section 4. Consent to Release
Liens. By executing this Amendment, each of the Banks, the Agents and the Issuer
hereby consents to the execution and delivery to the Borrower and/or Teal Hunter by the
Collateral Agent of one or more releases of Liens held by the Collateral Agent for the
benefit of the Banks, the Agents and the Issuer covering the Teal Hunter Properties.

Page 3

Section 5. Redetermination of Borrowing Base.

|(a) | Upon the Amendment Effective Date, the Borrowing Base shall automatically reduce
          to $280,000,000, which Borrowing Base shall remain in effect until the Borrowing
          Base shall be redetermined in accordance with clause (b) of this Section 5 or
          Section 2.8 of the Credit Agreement; and
|--- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

|(b) | Concurrently with the consummation of the Monetization Transaction, the
          Borrowing Base shall automatically reduce to $250,000,000, which Borrowing Base
          shall remain in effect until the Borrowing Base shall be redetermined in
          accordance with Section 2.8 of the Credit Agreement.
|--- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Section 6. Conditions
Precedent. The effectiveness of this Amendment is subject to the satisfaction of the
following conditions precedent:

|(a) | Executed Amendment. The Administrative Agent shall have received a
          counterpart of this Amendment duly executed by the Borrower, the Agents, the
          Issuer and each Bank, and duly acknowledged by each of the Guarantors.
|--- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

|(b) | Other Conditions. The Borrower shall have confirmed and acknowledged to
          the Agents, the Issuer and the Banks, and by its execution and delivery of this
          Amendment the Borrower does hereby confirm and acknowledge to the Administrative
          Agent and the Banks, that (i) the execution, delivery and performance of this
          Amendment has been duly authorized by all requisite corporate action on the part
          of the Borrower; (ii) the Credit Agreement and each other Loan Document to which
          it is a party constitute valid and legally binding agreements enforceable
          against the Borrower in accordance with their respective terms, except as such
          enforceability may be limited by bankruptcy, insolvency, reorganization,
          moratorium, fraudulent transfer or other similar laws relating to or affecting
          the enforcement of creditors rights generally and by general principles of
          equity; (iii) the representations and warranties by the Borrower contained in
          the Credit Agreement and in the other Loan Documents are true and correct on and
          as of the date hereof in all material respects as though made as of the date
          hereof; and (iv) no Default or Event of Default exists under the Credit
          Agreement or any of the other Loan Documents.
|--- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Section 7. Delivery of Partnership Agreement and Purchase Agreement.

|(a) | Not later than three (3) days after Prize has entered into the Partnership
          Agreement, the Borrower shall deliver to the Administrative Agent a copy of the
          Partnership Agreement certified by an Authorized Officer of the Borrower as
          being true and correct.
|--- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

|(b) | Not later than three (3) days after Prize and Production have entered into the
          Purchase Agreement, the Borrower shall deliver to the Administrative Agent a
          copy of the Purchase Agreement certified by an Authorized Officer of the
          Borrower as being true and correct.
|--- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Page 4

Section 8. Ratification of Credit
Agreement. Except as expressly amended, modified or waived by this Amendment, the
terms and provisions of the Credit Agreement and the other Loan Documents are ratified and
confirmed in all respects and shall continue in full force and effect.

Section 9. Expenses.  The Borrower agrees to pay on demand all expenses set forth in Section 10.3 of the Credit Agreement.

Section 10. Miscellaneous. (a)
On and after the effectiveness of this Amendment, each reference in each Loan Document to
this Agreement, this Note, this Mortgage, this
Guaranty, this Pledge Agreement, hereunder,
hereof or words of like import, referring to such Loan Document, and each
reference in each other Loan Document to the Credit Agreement, the
Notes, the Mortgages, the Guaranty, the Pledge
Agreement, thereunder, thereof or words of like import
referring to the Credit Agreement, the Notes, or the Mortgage, the Guaranty, the Pledge
Agreement or any of them, shall mean and be a reference to such Loan Document, the Credit
Agreement, the Notes, the Mortgage, the Guaranty, the Pledge Agreement or any of them, as
amended or otherwise modified by this Amendment; (b) the execution, delivery and
effectiveness of this Amendment shall not operate as a waiver of any default of the
Borrower or any right, power or remedy of the Administrative Agent or the Banks under any
of the Loan Documents, nor constitute a waiver of any provision of any of the Loan
Documents; (c) this Amendment may be executed in any number of counterparts and by
different parties hereto in separate counterparts, each of which when so executed shall be
deemed to be an original and all of which taken together shall constitute one and the same
agreement; and (d) delivery of an executed counterpart of a signature page to this
Amendment by telecopier shall be effective as delivery of a manually executed counterpart
of this Amendment.

Section 11. Severability. Any
provisions of this Amendment held by court of competent jurisdiction to be invalid or
unenforceable shall not impair or invalidate the remainder of this Amendment and the
effect thereof shall be confined to the provisions so held to be invalid or unenforceable.

Section 12. Applicable Law.
THIS AMENDMENT AND EACH OTHER LOAN DOCUMENT DELIVERED PURSUANT HERETO SHALL EACH BE
DEEMED TO BE A CONTRACT MADE UNDER AND GOVERNED BY, AND CONSTRUED IN ACCORDANCE WITH, THE
INTERNAL LAWS OF THE STATE OF NEW YORK (WITHOUT GIVING EFFECT TO THE PRINCIPLES THEREOF
RELATING TO CONFLICT OF LAW, EXCEPT SECTION 5-1401 OF THE NEW YORK GENERAL OBLIGATIONS
LAW). This Amendment constitutes the entire understanding among the parties hereto
with respect to the subject matter hereof and supersedes any prior agreements, written or
oral, with respect thereto.

Section 13. Successors and
Assigns. This Amendment is binding upon and shall inure to the benefit of the Agents,
the Issuer, the Banks and the Borrower and their respective successors and assigns.

Section 14. Headings. The
headings, captions, and arrangements used in this Amendment are for convenience only and
shall not affect the interpretation of this Amendment.

Page 5

Section 15. NO ORAL
AGREEMENTS. THIS AMENDMENT AND ALL OTHER INSTRUMENTS, DOCUMENTS AND AGREEMENTS
EXECUTED AND DELIVERED IN CONNECTION HEREWITH REPRESENT THE FINAL AGREEMENT AMONG THE
PARTIES WITH RESPECT TO THE MATTERS HEREIN CONTAINED, AND MAY NOT BE CONTRADICTED BY
EVIDENCE OF PRIOR, CONTEMPORANEOUS OR SUBSEQUENT ORAL AGREEMENTS BETWEEN THE PARTIES.
THERE ARE NO UNWRITTEN ORAL AGREEMENTS AMONG THE PARTIES.

[Signature
pages follow]

Page 6

EXECUTED as of the day and
year first above written.

| | BORROWER:MAGNUM HUNTER RESOURCES, INC.By:/s/Chris Tong      Name:       Chris Tong      Title:        Senior Vice President                      Chief Financial Officer                                              
| | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| | AGENTS, BANKS AND ISSUER:DEUTSCHE BANK TRUST COMPANY AMERICAS (formerly named Bankers Trust Company), as Administrative Agent, Collateral Agent, Issuer and a Bank By: ________________________      Name:      Title:
| | CIBC INC., as Syndication Agent and a Bank By: ________________________       Name:      Title:                                                                                                                       

Page 7

| | BNP PARIBAS, as Documentation Agent and a BankBy:_____________________      Name:     Title:
                    - and -
By:_____________________       Name:      Title:
| | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| | FORTIS CAPITAL CORP., as a BankBy:_____________________      Name:     Title:
                     - and -
By:_____________________      Name:     Title:                
| | BANK OF SCOTLAND, as a BankBy: ________________________       Name:       Title:                                                                                         
| | BANK OF NOVA SCOTIA, as a BankBy: ________________________      Name:      Title:                                                                                        

Page 8

| | UNION BANK OF CALIFORNIA, N.A., as a BankBy: ________________________      Name:      Title:
| | --------------------------------------------------------------------------------------------
| | COMPASS BANK, as a BankBy: ________________________      Name:      Title:                  
| | WELLS FARGO BANK TEXAS, NA, as a BankBy: ________________________       Name:      Title:   
| | COMERICA BANK - TEXAS, as a BankBy: __________________________       Name:      Title:      
| | WASHINGTON MUTUAL BANK, FA, as a BankBy: __________________________      Name:      Title:  

Page 9

| |                                                                                                
| | -----------------------------------------------------------------------------------------------
| |                                                                                                
| | HIBERNIA NATIONAL BANK, as a BankBy: __________________________       Name:     Title:         
| | U.S. BANK NATIONAL ASSOCIATION, as a BankBy: __________________________       Name:      Title:

Page 10

ACKNOWLEDGMENT
BY GUARANTORS

Each
of the undersigned Guarantors hereby (i) consents to the terms and conditions of that
certain Third Amendment to Fourth Amended and Restated Credit Agreement dated as of August
28, 2002 (the Third Amendment), (ii) acknowledges and agrees that its
consent is not required for the effectiveness of the Third Amendment, (iii) ratifies and
acknowledges its respective Obligations under each Loan Document to which it is a party,
and (iv) represents and warrants that (a) no Default or Event of Default has occurred and
is continuing, (b) it is in full compliance with all covenants and agreements pertaining
to it in the Loan Documents, and (c) it has reviewed a copy of the Third Amendment.

Executed
to be effective as of August 28, 2002.

| | GUARANTORS:HUNTER GAS GATHERING, INC.GRUY PETROLEUM MANAGEMENT CO.MAGNUM HUNTER PRODUCTION, INC.CONMAG ENERGY CORPORATIONTRAPMAR PROPERTIES, INC. PINTAIL ENERGY, INC. PRIZE OPERATING COMPANYPEC (DELAWARE), INC.OKLAHOMA GAS PROCESSING, INC. By:  /s/Chris Tong     Name:     Chris Tong     Title:       Senior Vice President and                     Chief Financial Officer
| | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| | PRIZE ENERGY RESOURCES, L.P.By:     Prize Operating Company,           as its general partner
By:_________________________      Name:     Senior Vice President and                     Chief Financial Officer                                                                                                                                                                   

Page 11

Annex I

|Borrowing Base
Usage (BBU) | Base Rate Loans | LIBO Rate Loans | Letters of Credit
|-------------------------- | --------------- | --------------- | -----------------
|BBU < 25%                  |                 |                 |                  
|25% <= BBU < 50%           |                 |                 |                  
|50 <= BBU < 75%            |                 |                 |                  
|75% <= BBU < 90%           |                 |                 |                  
|BBU => 90%                 |                 |                 |                  

Page 12