##### 



AMENDED AND RESTATED
SECURITY AGREEMENT
 BETWEEN
 PRIMEENERGY CORPORATION
PRIMEENERGY MANAGEMENT CORPORATION
PRIME OPERATING COMPANY
EASTERN OIL WELL SERVICE COMPANY
SOUTHWEST OILFIELD CONSTRUCTION COMPANY
EOWS MIDLAND COMPANY
 (DEBTOR)
 AND
 GUARANTY BANK, FSB, AS AGENT
(SECURED PARTY)
 DECEMBER 28, 2006




---



##### 



TABLE OF CONTENTS
 PageARTICLE I
    
    DEFINITIONS AND INTERPRETATION
    
    
    11.1
    
    Terms Defined Above
    
    
    11.2
    
    Terms Defined in Credit Agreement
    
    
    11.3
    
    Additional Defined Terms
    
    
    11.4
    
    Undefined Financial Accounting Terms
    
    
    21.5
    
    References
    
    
    21.6
    
    Articles and Sections
    
    
    21.7
    
    Number and Gender
    
    
    2ARTICLE II
    
    GRANT OF SECURITY INTEREST
    
    
    2ARTICLE III
    
    REPRESENTATIONS AND WARRANTIES
    
    
    33.1
    
    Validity, Perfection and Priority
    
    
    33.2
    
    No Liens; Other Financing Statements
    
    
    33.3
    
    Location of Debtor
    
    
    33.4
    
    Tradenames; Prior Names
    
    
    3ARTICLE IV
    
    COVENANTS
    
    
    34.1
    
    Further Assurances
    
    
    44.2
    
    Change of Chief Executive Office
    
    
    44.3
    
    Change of Name or Corporate Structure
    
    
    44.4
    
    Title, Prohibited Liens and Filings
    
    
    44.5
    
    Possession of Collateral
    
    
    54.6
    
    Inspection of Collateral
    
    
    54.7
    
    Financing Statement Filings; Notifications
    
    
    5ARTICLE V
    
    POWER OF ATTORNEY
    
    
    55.1
    
    Appointment as Attorney-in-Fact
    
    
    55.2
    
    No Duty on the Part of Secured Party
    
    
    6ARTICLE VI
    
    REMEDIES; RIGHTS UPON DEFAULT
    
    
    76.1
    
    Rights and Remedies Generally
    
    
    76.2
    
    Proceeds
    
    
    76.3
    
    Disposition of Collateral
    
    
    76.4
    
    Possession of Collateral
    
    
    76.5
    
    Disposition of the Collateral
    
    
    86.6
    
    Recourse
    
    
    96.7
    
    Expenses; Attorneys Fees
    
    
    96.8
    
    Application of Proceeds
    
    
    96.9
    
    Limitation on Duties Regarding Preservation of Collateral
    
    
    96.10
    
    Waiver of Claims
    
    
    106.11
    
    Discontinuance of Proceedings
    
    
    10
 - i -




---



##### 



PageARTICLE VII
    
    INDEMNITY
    
    
    107.1
    
    INDEMNITY
    
    
    107.2
    
    Indemnity Obligations Secured by Collateral; Survival
    
    
    11ARTICLE VIII
    
    MISCELLANEOUS
    
    
    128.1
    
    No Waiver; Remedies Cumulative
    
    
    128.2
    
    Termination; Release
    
    
    128.3
    
    Counterparts
    
    
    128.4
    
    Marshalling
    
    
    128.5
    
    Severability
    
    
    128.6
    
    Financing Statement Filing
    
    
    128.7
    
    Notices and Other Communications
    
    
    138.8
    
    Parties in Interest
    
    
    138.9
    
    Amendments
    
    
    138.10
    
    ENTIRE AGREEMENT
    
    
    138.11
    
    GOVERNING LAW
    
    
    138.12
    
    JURISDICTION AND VENUE
    
    
    13
 - ii -




---



##### 



AMENDED AND RESTATED  SECURITY AGREEMENT
 AMENDED AND RESTATED SECURITY AGREEMENT Agreement PRIMEENERGY CORPORATION, PEC PRIMEENERGY
MANAGEMENT CORPORATION, PRIME OPERATING COMPANY, EASTERN OIL WELL SERVICE COMPANY, SOUTHWEST OILFIELD CONSTRUCTION
COMPANY, EOWS MIDLAND COMPANY, Debtor GUARANTY BANK, FSB, Secured Party
 W I T N E S S E T H:
 Credit
Agreement
    ARTICLE I
 DEFINITIONS AND INTERPRETATION
 Terms Defined Above Agreement Credit Agreement Debtor, Secured Party
 Terms Defined in Credit Agreement
 Additional Defined Terms
 Collateral




---



##### 



Equipment
 Indemnitees
 Proceeds
 Secured Obligations
 UCC
 Undefined Financial Accounting Terms
 References
 Articles and Sections
 Number and Gender
 ARTICLE II
 GRANT OF SECURITY INTEREST
  - 2 -




---



##### 



Collateral
 (a)
    
    all Equipment; and(b)
    
    all accessions and additions to any or all of the foregoing, all
substitutions and replacements for any or all of the foregoing, and all
Proceeds and products of any or all of the foregoing.
 ARTICLE III
 REPRESENTATIONS AND WARRANTIES
  Validity, Perfection and Priority
 No Liens; Other Financing Statements
  Location of Debtor
 Tradenames; Prior Names
 ARTICLE IV
 COVENANTS
  - 3 -




---



##### 



Further Assurances
    Change of Chief Executive Office
 Change of Name or Corporate Structure
 Title, Prohibited Liens and Filings
 - 4 -




---



##### 



Possession of Collateral
 Inspection of Collateral
 Financing Statement Filings; Notifications
 ARTICLE V
 POWER OF ATTORNEY
 Appointment as Attorney-in-Fact
  - 5 -




---



##### 



No Duty on the Part of Secured Party
 - 6 -




---



##### 



ARTICLE VI
 REMEDIES; RIGHTS UPON DEFAULT
 Rights and Remedies Generally
 Proceeds
 Disposition of Collateral
   Possession of Collateral
 - 7 -




---



##### 



Disposition of the Collateral
 - 8 -




---



##### 



Recourse
 Expenses; Attorneys Fees
 Application of Proceeds
 (a)
    
    first,to payment or reimbursement of that portion of the Obligations
constituting fees, expenses and indemnities payable to the Agent in its
capacity as such;(b)
    
    second,pro rata to payment or reimbursement of that portion of the
Obligations constituting fees, expenses and indemnities payable to the
Lenders;(c)
    
    third,pro rata to payment of accrued interest on the Loans;(d)
    
    fourth,pro rata to payment of principal outstanding on the Loans and
Obligations owed to any Lender or affiliate of any Lender under any Commodity
Hedge Agreement or Rate Management Transaction;(e)
    
    fifth,pro rata to any other Obligations;(f)
    
    sixth,to serve as cash collateral to be held by the Agent to secure
the LC Exposure; and(g)
    
    seventh,any excess, after all of the Obligations shall have been
indefeasibly paid in full in cash, shall be paid to the Borrower or as
otherwise required by any Governmental Authority.
 Limitation on Duties Regarding Preservation of Collateral
 - 9 -




---



##### 



Waiver of Claims
     Discontinuance of Proceedings
 ARTICLE VII
 INDEMNITY
 INDEMNITY . DEBTOR AGREES TO INDEMNIFY, REIMBURSE, AND HOLD THE INDEMNITEES
HARMLESS FROM ANY AND ALL LIABILITIES, OBLIGATIONS, LOSSES, DAMAGES, PENALTIES, CLAIMS, ACTIONS,
JUDGMENTS, SUITS, COSTS, EXPENSES, OR DISBURSEMENTS (INCLUDING REASONABLE ATTORNEYS FEES AND
EXPENSES) (FOR THE PURPOSES OF
 - 10 -




---



##### 



THIS SECTION ALL OF THE FOREGOING ARE COLLECTIVELY CALLED EXPENSES) OF WHATSOEVER KIND OR NATURE
WHICH MAY BE IMPOSED ON, ASSERTED AGAINST, OR INCURRED BY ANY OF SUCH INDEMNITEES IN ANY WAY
RELATING TO OR ARISING OUT OF THIS AGREEMENT OR THE DOCUMENTS EXECUTED IN CONNECTION HEREWITH OR
IN ANY OTHER WAY CONNECTED WITH THE ADMINISTRATION OF THE TRANSACTIONS CONTEMPLATED HEREBY OR THE
ENFORCEMENT OF ANY OF THE TERMS OF OR THE PRESERVATION OF ANY RIGHTS HEREUNDER, INCLUDING, WITHOUT
LIMITATION, THOSE ARISING FROM THE NEGLIGENCE, WHETHER SOLE OR CONCURRENT, OF ANY INDEMNITEE;
PROVIDED THAT NO SUCH INDEMNITEE SHALL BE INDEMNIFIED PURSUANT TO THIS SECTION FOR EXPENSES TO THE
EXTENT ARISING FROM THE GROSS NEGLIGENCE OF SUCH INDEMNITEE.
    Indemnity Obligations Secured by Collateral; Survival
 - 11 -




---



##### 



ARTICLE VIII
 MISCELLANEOUS
 No Waiver; Remedies Cumulative
 Termination; Release
 Counterparts
 Marshalling
 Severability
 Financing Statement Filing
 - 12 -




---



##### 



Notices and Other Communications
 Parties in Interest
 Amendments
 ENTIRE AGREEMENT . THIS AGREEMENT CONSTITUTES THE ENTIRE AGREEMENT BETWEEN THE
PARTIES HERETO WITH RESPECT TO THE SUBJECT HEREOF AND SHALL SUPERSEDE ANY PRIOR AGREEMENTS,
WHETHER WRITTEN OR ORAL, BETWEEN THE PARTIES HERETO RELATING TO THE SUBJECT HEREOF. FURTHERMORE,
IN THIS REGARD, THIS AGREEMENT AND THE OTHER WRITTEN LOAN DOCUMENTS REPRESENT, COLLECTIVELY, THE
FINAL AGREEMENT AMONG THE PARTIES THERETO AND MAY NOT BE CONTRADICTED BY EVIDENCE OF PRIOR,
CONTEMPORANEOUS, OR SUBSEQUENT ORAL AGREEMENTS OF SUCH PARTIES. THERE ARE NO UNWRITTEN ORAL
AGREEMENTS AMONG SUCH PARTIES.
 GOVERNING LAW . THIS AGREEMENT SHALL BE GOVERNED BY AND CONSTRUED IN ACCORDANCE
WITH THE LAWS OF THE STATE OF TEXAS (WITHOUT GIVING EFFECT TO PRINCIPLES THEREOF RELATING TO
CONFLICTS OF LAWS).
 JURISDICTION AND VENUE . ALL ACTIONS OR PROCEEDINGS WITH RESPECT TO, ARISING
DIRECTLY OR INDIRECTLY IN CONNECTION WITH, OUT OF, RELATED TO OR FROM THIS AGREEMENT OR ANY OTHER
LOAN DOCUMENT TO WHICH ANY DEBTOR IS A PARTY MAY BE LITIGATED, AT THE SOLE DISCRETION AND ELECTION
OF THE SECURED PARTY, IN COURTS HAVING SITUS IN HOUSTON, HARRIS COUNTY, TEXAS. DEBTOR HEREBY
SUBMITS TO THE JURISDICTION OF ANY LOCAL, STATE, OR FEDERAL COURT LOCATED IN HOUSTON, HARRIS
COUNTY, TEXAS, AND HEREBY WAIVES ANY RIGHTS IT MAY HAVE TO TRANSFER OR CHANGE THE JURISDICTION OR
VENUE OF ANY LITIGATION BROUGHT AGAINST IT BY THE SECURED PARTY IN ACCORDANCE WITH THIS SECTION.
 - 13 -




---



##### 



IN WITNESS WHEREOF,
 DEBTOR:PRIMEENERGY CORPORATION 
PRIMEENERGY MANAGEMENT
CORPORATION, PRIME OPERATING 
COMPANY, EASTERN OIL WELL SERVICE 
COMPANY, SOUTHWEST OIL FIELD
CONSTRUCTION COMPANY 
EOWS MIDLAND COMPANYBy:
    
    /s/ Beverly A.CummingsBeverly A.CummingsExecutive Vice President, Treasurer, andChief Financial Officer
 - 14 -




---



##### 



SECURED PARTY:GUARANTY BANK, FSB,as AgentBy:
    
    /s/ David M. ButlerDavid M. ButlerVice President
 - 15 -




---



##### 



EXHIBIT A
 Section 3.1:
    
    FILING LOCATIONSSecretary of State of DelawareSecretary of State of New YorkSecretary of State of TexasSecretary of State of West VirginiaCounty Clerk of Oklahoma County, Oklahoma
 A-i