**EXHIBIT4.2**

** **

**AGREEMENT AND AMENDMENTNO. 1 TO THIRD AMENDED**

**AND RESTATED CREDIT AGREEMENT**

 

ThisAGREEMENT AND AMENDMENT NO. 1 TO THIRD AMENDED AND RESTATED CREDIT AGREEMENT (“Agreement”)dated as of May 31, 2005 (the “Effective Date”) is among EdgePetroleum Corporation, a Delaware corporation (“Parent”), Edge PetroleumExploration Company, a Delaware corporation (“Edge Exploration”), EdgePetroleum Operating Company, Inc., a Texas corporation (“Edge Operating”)Miller Exploration Company, a Delaware corporation (“Miller Exploration”),and Miller Oil Corporation, a Michigan corporation (“Miller Operating”,and together with the Parent, Edge Exploration, Edge Operating and MillerExploration referred to collectively as the “Borrowers”), the lendersparty to the Credit Agreement (as defined below) from time to time (the “Lenders”),and Union Bank of California, N.A., as agent for the Lenders (“Agent”).

 

**RECITALS**

 

A.                                   TheBorrowers, the Lenders and the Agent are parties to the Third Amended andRestated Credit Agreement dated as of December 31, 2003 (the “CreditAgreement”; the defined terms of which are used herein otherwise definedherein).

 

B.                                     TheBorrowers, the Lenders and the Agent wish to, subject to the terms andconditions of this Agreement:  (1) increasethe Borrowing Base, (2) extend the maturity date and (3) make suchother amendments to the Credit Agreement as provided herein.

 

THEREFORE,the Borrowers, the Lenders and the Agent hereby agree as follows:

 

**Section 1.****                                         ****Defined Terms; OtherDefinitional Provisions**.  As used inthis Agreement, each of the terms defined in the opening paragraph and theRecitals above shall have the meanings assigned to such terms therein.****The words “hereby”, “herein”, “hereinafter”, “hereof”, “hereto”and “hereunder” when used in this Agreement shall refer to this Agreement as awhole and not to any particular Article, Section, subsection or provisionof this Agreement. All titles or headings to Articles, Sections, subsections orother divisions of this Agreement or the exhibits hereto, if any, are only forthe convenience of the parties and shall not be construed to have any effect ormeaning with respect to the other content of such Articles, Sections,subsections, other divisions or exhibits, such other content being controllingas the agreement among the parties hereto. Whenever the context requires, reference herein made to the singlenumber shall be understood to include the plural; and likewise, the pluralshall be understood to include the singular. Words denoting sex shall be construed to include the masculine, feminineand neuter, when such construction is appropriate; and specific enumerationshall not exclude the general but shall be construed as cumulative.

 

**Section 2.****                                         ****Increase in Borrowing Base**.** **TheBorrowing Base shall, effective as of the Effective Date, be increased from$65,000,000.00 to $70,000,000.00.  Suchnew Borrowing Base shall remain in effect at that level until the BorrowingBase is redetermined in accordance with the terms of the Credit Agreement.

 

----

 

**Section 3.****                                         ****Amendments to the CreditAgreement**.

 

(a)                                  Section 1.2 of the Credit Agreementis hereby amended by replacing the definitions of “Applicable Margin” and “FinalMaturity Date” in their entirety with the following, respectively:

 

*“Applicable Margin”****shall mean, at any time, the rate per annum set forth inthe pricing grid below based on the relevant Utilization Level applicable atsuch time.  The Applicable Margin for anyLoan shall change when and as the relevant Utilization Level changes. *

 

| **Utilization Level**                                                   | ** ** | **LIBO Rate  Loan** | ** ** | **Base Rate Loan** | ** ** | **Commitment  Fee** | ** ** |
|-------------------------------------------------------------------------|------------|---------------------|------------|--------------------|------------|---------------------|------------|
| *Utilization Level is equal to or less than 50%.*                       | * *   | *1.750*             | *%*        | *0.000*            | *%*        | *0.500*             | *%*        |
| *Utilization Level is greater than 50% but less  than or equal to 75%.* | * *   | *1.875*             | *%*        | *0.125*            | *%*        | *0.375*             | *%*        |
| *Utilization Level is greater than 75%.*                                | * *   | *2.125*             | *%*        | *0.250*            | *%*        | *0.250*             | *%*        |

 

*“Final Maturity Date”****shall mean December 31, 2007.*

 

(b)                                 Section 1.2 of the Credit Agreementis hereby further amended by inserting the following new definitions inalphabetical order:

 

*“CommitmentFee Rate” means the per annum commitment fee rate set forth on the PricingGrid applicable from time to time.  TheCommitment Fee Rate shall change when and as the relevant Utilization Levelchanges.*

 

*“UtilizationLevel” shall mean the applicable category of pricing criteria contained inthe definition of Applicable Margin, which is based on, at any time of itsdetermination, the percentage obtained by dividing (a) the sum of the LoanBalance and the L/C Exposure at such time by (b) the lesser of (i) theaggregate Commitments and (ii) the Borrowing Base at such time.*

 

(c)                                  Section 2.13 of the Credit Agreementis hereby amended by replacing the phrase “*at the rate of .375% perannum*” contained therein with “*at a per annum rate equalto the Commitment Fee Rate*.”

 

**Section 4.****                                         ****Representations andWarranties**.  The Borrowers hereby represent and warrantthat:  (a)  except for suchrepresentations which are made only as of a prior date, the representations andwarranties set forth in the Credit Agreement and in the other Loan Documentsare true and correct in all respects as of the Effective Date as if made on andas of such date; (b) the execution, delivery and performance of thisAgreement and any Loan

 

2

----

 

Documents executedand delivered in connection with this Agreement are within the corporate powerand authority of each Borrower and have been duly authorized by appropriatecorporate action and proceedings; (c) this Agreement and the LoanDocuments executed in connection with this Agreement constitute legal, valid,and binding obligations of the Borrowers party hereto and thereto, enforceablein accordance with their terms, except as limited by applicable bankruptcy,insolvency, reorganization, moratorium, or similar laws affecting the rights ofcreditors generally and general principles of equity; and (d) there are nogovernmental or other third party consents, licenses and approvals required inconnection with the execution, delivery, performance, validity andenforceability of this Agreement and such other Loan Documents.

 

**Section 5.****                                         ****Conditions**. This Agreement shall become effective and enforceable against theparties hereto, the Credit Agreement shall be amended as provided herein, andthe Borrowing Base increase provided herein shall become effective upon theoccurrence of the following conditions precedent on or before the EffectiveDate:

 

(a)                                  Agreement.  The Agent shall have received multipleoriginal counterparts of this Agreement duly and validly executed and deliveredby duly authorized officers of the Borrowers, the Agent and the Lenders.

 

(b)                                 Other Instruments orDocuments.  The Agentand the Lenders shall have received duly executed new Security Instruments andsuch other instruments, documents and attachments to existing SecurityInstruments as any of them may reasonably request.

 

(c)                                  No Default.  No Default shall have occurred and becontinuing as of the Effective Date.

 

(d)                                 Fees.  The Borrowers shall have paid (i) aBorrowing Base increase fee in the amount of $25,000 as required under Section 2.15of the Credit Agreement, and (ii) all fees and expenses of the Agent’soutside legal counsel and other consultants pursuant to all invoices presentedfor payment on or prior to the Effective Date.

 

**Section 6.****                                         ****Miscellaneous**.

 

(a)                                  Effect on Loan Documents.  Each of theBorrowers, the Lenders and the Agent does hereby adopt, ratify, and confirm theCredit Agreement, as amended hereby and acknowledges and agrees that the CreditAgreement, as amended hereby, is and remains in full force and effect.  Nothing herein shall act as a waiver of anyof the Agent’s or the Lender’s rights under the Loan Documents, asamended.  From and after the EffectiveDate, all references to the Credit Agreement and the Loan Documents shall meansuch Credit Agreement and such Loan Documents, as amended hereby.  This Agreement is a Loan Document for thepurposes of the provisions of the other Loan Documents.  Without limiting the foregoing, any breach ofrepresentations, warranties, and covenants under this Agreement shall be anEvent of Default under the Credit Agreement.

 

(b)                                 Counterparts. This Agreement may be signed in any number of counterparts, each ofwhich shall be an original and all of which, taken together, constitute asingle instrument.  This Agreement may beexecuted by facsimile signature and all such signatures shall be effective asoriginals.

 

3

----

 

(c)                                  Successors and Assigns. This Agreement shall be binding upon and inure to the benefit of the partieshereto and their respective successors and assigns permitted pursuant to theCredit Agreement.

 

(d)                                 Invalidity.  In the eventthat any one or more of the provisions contained in this Agreement shall forany reason be held invalid, illegal or unenforceable in any respect, suchinvalidity, illegality or unenforceability shall not affect any other provisionof this Agreement.

 

(e)                                  Governing Law. This Agreement shall be deemed to be a contract made under and shall begoverned by and construed in accordance with the laws of the State of Texas.

 

**THISAGREEMENT, THE CREDIT AGREEMENT, THE NOTES, AND THE OTHER LOAN DOCUMENTSCONSTITUTE THE ENTIRE UNDERSTANDING AMONG THE PARTIES HERETO WITH RESPECT TOTHE SUBJECT MATTER HEREOF AND SUPERSEDE ANY PRIOR AGREEMENTS, WRITTEN OR ORAL,WITH RESPECT THERETO.**

 

[SIGNATURES BEGIN ON NEXT PAGE]

 

4

----

 

EXECUTEDeffective as of the date first above written.

 
|   | **BORROWERS:**                          |                                      |
|--------|-----------------------------------------|-------------------------------------------|
|   |                                    |                                      |
|   | EDGE PETROLEUM  CORPORATION             |                                      |
|   | EDGE PETROLEUM  EXPLORATION COMPANY     |                                      |
|   | EDGE PETROLEUM  OPERATING COMPANY, INC. |                                      |
|   | MILLER OIL  CORPORATION                 |                                      |
|   | MILLER  EXPLORATION COMPANY             |                                      |
|   |                                    |                                      |
|   |                                    |                                      |
| :      | All by:                                 | /S/ MICHAEL G.  LONG                      |   |
|   |                                    | Michael G. Long,  Chief Financial Officer |
|   |                                    |                                      |
|   |                                    |                                      |
|   | **AGENT  AND LENDERS:**                 |                                      |
|   |                                    |                                      |
|   | UNION BANK OF  CALIFORNIA, N.A., as     |                                      |
|   | Agent and as a  Lender                  |                                      |
|   |                                    |                                      |
|   | By:                                     | /S/ DAMIEN MEIBURGER                      |   |
|   |                                    | Damien Meiburger                          |
|   |                                    | Senior Vice President                     |
|   |                                    |                                      |
|   |                                    |                                      |
|   | BNP PARIBAS, as  a Lender               |                                      |
|   |                                    |                                      |
|   |                                    |                                      |
|   | By:                                     | /S/ DAVID DODD                            |   |
|   | Name:                                   |                                      | David Dodd |   |
|   | Title:                                  |                                      | DIRECTOR |   |
|        |                                         |                                           |  |  |  |  |  |  |

 
|   | By:    | /S/ GABE ELLISOR |           |
|--------|--------|------------------|----------------|
|   | Name:  |             | Gabe Ellisor   |   |
|   | Title: |             | VICE PRESIDENT |   |
|        |        |                  |                |  |  |

 

Signature Page to Agreement and Amendment No. 1

(Edge Petroleum Corporation)

 

----