Exhibit 10.2AMENDED AND RESTATED GUARANTY     THIS AMENDED AND RESTATED GUARANTY (this “***Guaranty***”), dated as of April 26, 2007, is made byeach of the undersigned (individually, a “***Guarantor***” and collectively, the “***Guarantors***”), in favorof ROYAL BANK OF CANADA, as administrative agent for the Lenders (as defined below).WITNESSETH:     WHEREAS, Allis-Chalmers Energy Inc., a Delaware corporation (the “***Borrower***”), Royal Bank ofCanada, individually and as administrative agent and collateral agent (in its capacity asadministrative agent, the “***Administrative Agent***”)***,***and certain other lenders party thereto enteredinto a Credit Agreement, originally dated as of July 11, 2005, providing for an aggregate creditfacility of up to $55,000,000 (as amended, the “***Original Credit Agreement***”)***;***and     WHEREAS, as a condition precedent to making advances under the Original Credit Agreement, eachof AirComp, LLC, a Delaware limited liability company, Allis-Chalmers Production Services, Inc., aTexas corporation, formerly known as Capcoil Tubing Services, Inc. and successor by merger withDownhole Injection Systems, L.L.C., a Texas limited liability company, Allis-Chalmers RentalServices, Inc., a Texas corporation, formerly known as Allis-Chalmers Rental Tools, Inc. and priorto that formerly known as Safco-Oil Field Products, Inc., successor by merger with Specialty RentalTools, Inc., a Louisiana corporation and with Delta Rental Services, Inc., a Louisiana corporation,Allis-Chalmers Tubular Services, Inc., a Texas corporation, formerly known as Jens’ Oil FieldService, Inc., successor by merger with Rogers Oil Tool Services, Inc., a Louisiana corporation,Mountain Compressed Air, Inc., a Texas corporation, OilQuip Rentals, Inc. and Strata DirectionalTechnology, Inc., a Texas corporation, successor by merger with Target Energy, Inc. entered into aGuaranty dated July 11, 2005 in favor of the Administrative Agent guaranteeing payment of theindebtedness of the Borrower under the Original Credit Agreement; and     WHEREAS, the Original Credit Agreement was amended and restated in its entirety by an Amendedand Restated Credit Agreement dated January 18, 2006 among Borrower, Royal Bank of Canada,individually and as Administrative Agent and collateral agent***,***and certain other lenders partythereto, providing for a reduced aggregate credit facility of $25,000,000 (as amended, the “***Amendedand Restated Credit Agreement***”); and     WHEREAS, the Amended and Restated Credit Agreement was amended by a First Amendment to Amendedand Restated Credit Agreement dated August 8, 2006 among Borrower, Royal Bank of Canada,individually and as Administrative Agent and collateral agent***,***and certain other lenders partythereto (the “***First Amendment***”) and;     WHEREAS, as a condition precedent to the effectiveness of the First Amendment, each ofAllis-Chalmers GP, LLC, a Delaware limited liability company, Allis-Chalmers LP, LLC, a Delawarelimited liability company, and Allis-Chalmers Management, LP, a Texas limited partnership enteredinto a Guaranty dated August 8, 2006 in favor of the Administrative Agent guaranteeing payment ofthe indebtedness of the Borrower under the Amended and Restated Credit Agreement, as amended by the First Amendment; andAmended and Restated Guaranty
1

 
     WHEREAS, the Amended and Restated Credit Agreement was amended and restated in its entirety bya Second Amended and Restated Credit Agreement of even date herewith among Borrower, Royal Bank ofCanada, individually and as Administrative Agent and collateral agent***,***and certain other lendersparty thereto, providing for an aggregate credit facility of $62,000,000 (the “***Second Amended andRestated Credit Agreement***”); and     WHEREAS, each Guarantor is a wholly owned direct or indirect subsidiary of the Borrower; and     WHEREAS, as a condition precedent to funding of Loans under the Second Amended and RestatedCredit Agreement, each Guarantor is required to deliver this Guaranty pursuant to ***Section 6.13***ofthe Second Amended and Restated Credit Agreement; and     WHEREAS, each Guarantor has duly authorized the execution, delivery and performance of thisGuaranty; and     WHEREAS, it is in the best interests of each Guarantor to execute this Guaranty inasmuch aseach Guarantor will derive substantial direct and indirect benefits from the extensions of credit made from time to time to or for the account of the Borrower.     NOW THEREFORE, for good and valuable consideration the receipt of which is herebyacknowledged, and in order to induce the Lenders to fund Loans to the Borrower pursuant to theSecond Amended and Restated Credit Agreement by fulfilling the requirements of the Second Amendedand Restated Credit Agreement, each Guarantor agrees, for the benefit of each Lender, as follows:ARTICLE IDEFINITIONS     **SECTION 1.1****Certain Terms**. The following capitalized terms when used in this Guaranty,including its preamble and recitals, shall have the following meanings (such definitions to beequally applicable to the singular and plural forms thereof):     “***Administrative Agent***” is defined in the first recital.     “***Borrower***” is defined in the first recital.     “***Commitments”***means each Commitment as defined in the Second Amended and Restated CreditAgreement.     “***Guarantor***” and “***Guarantors***” are defined in the preamble.     “***Guaranty”***is defined in the preamble.     “***Lenders***” is defined in the first recital.     “***Loans***” means each Loan as defined in the Second Amended and Restated Credit Agreement.
2

 
     “***Loan Documents***” means the Loan Documents as defined in the Second Amended and Restated CreditAgreement.     “***Note***” means each Note as defined in the Second Amended and Restated Credit Agreement.     “***Obligations***” means the Obligations as defined in the Second Amended and Restated CreditAgreement.     “***Obligor***” means the Borrower or any other Person (other than the Administrative Agent or anyLender) obligated under any Loan Document.     “***Required Lenders***” means the Required Lenders as defined in the Second Amended and RestatedCredit Agreement.     “***Subsidiary Guarantors***” means Subsidiaries of Borrower that have guaranteed all or any part ofthe Obligations.     “***Taxes***” is defined in clause ***(a)***of ***Section 2.7***.     “***UCC***” means the Uniform Commercial Code as in effect in the State of Texas.     **SECTION 1.2****Second Amended and Restated Credit Agreement Definitions**. Unless otherwisedefined herein or the context otherwise requires, capitalized terms used in this Guaranty,including its preamble and recitals, have the meanings provided in the Second Amended and RestatedCredit Agreement.     **SECTION 1.3****UCC Definitions**. Unless otherwise defined herein or the context otherwiserequires, terms for which meanings are provided in the UCC are used in this Guaranty, including itspreamble and recitals, with such meanings.ARTICLE IIGUARANTY PROVISIONS     **SECTION 2.1****Guaranty**. Each Guarantor hereby absolutely, unconditionally, andirrevocably (1) guarantees the full and punctual payment when due, whether at stated maturity, byrequired prepayment, declaration, acceleration, demand or otherwise, of all Obligations of theBorrower and each other Obligor now or hereafter existing under each of the Second Amended andRestated Credit Agreement, the Notes and each other Loan Document to which the Borrower or suchother Obligor is or may become a party, whether for principal, interest, fees, expenses orotherwise (including all such amounts which would become due but for the operation of the automaticstay under *Section*362(a) of the United States Bankruptcy Code, 11 U.S.C. §362(a), and theoperation of *Sections 502(b*) and *5**06(b)* of the United States Bankruptcy Code, 11 U.S.C. §502(b) and§506(b)), and (2) indemnifies and holds harmless each Lender and each holder of a Note for any andall costs and expenses (including reasonable attorney’s fees and expenses) incurred by such Lenderor such holder, as the case may be, in enforcing any rights under this Guaranty; *provided however,*that each Guarantor shall be liable under this Guaranty for the maximum amount of such liabilitythat can be hereby incurred without rendering this Guaranty, as it relates to such Guarantor,voidable under applicable law relating to fraudulent conveyance or fraudulent
3

 
transfer, and not for any greater amount. This Guaranty constitutes a guaranty of payment whendue and not of collection, and each Guarantor specifically agrees that it shall not be necessary orrequired that any Lender or any holder of any Note exercise any right, assert any claim or demandor enforce any remedy whatsoever against the Borrower or any other Obligor (or any other Person)before or as a condition to the obligations of such Guarantor hereunder.     **SECTION 2.2****Acceleration of Guaranty**. Each Guarantor agrees that, in the event of theoccurrence of any event of the type described in ***Section 8.01(f****)***or*****Section 8.******01(g)*** of the SecondAmended and Restated Credit Agreement, with respect to the Borrower, any other Obligor or any otherGuarantor, and if such event shall occur at a time when any of the Obligations may not then be dueand payable, such Guarantor will pay to the Lenders forthwith the full amount which would bepayable hereunder by such Guarantor if all such Obligations were then due and payable.     **SECTION 2.3****Guaranty Absolute, etc****.**This Guaranty shall in all respects be acontinuing, absolute, unconditional and irrevocable guaranty of payment, and shall remain in fullforce and effect until all Obligations of the Borrower and each other Obligor have been paid infull, all obligations of the Guarantors hereunder shall have been paid in full, all Commitmentsshall have terminated and, except as provided in ***Section 10.******01(e)*** of the Second Amended andRestated Credit Agreement, all Lender Hedging Agreements have terminated. No Guarantor may rescindor revoke its obligations hereunder. Each Guarantor guarantees that the Obligations of the Borrowerand each other Obligor will be paid strictly in accordance with the terms of the Second Amended andRestated Credit Agreement and each other Loan Document and each Lender Hedging Agreement underwhich they arise, regardless of any law, regulation or order now or hereafter in effect in anyjurisdiction affecting any of such terms or the rights of any Lender or any holder of any Note withrespect thereto. The liability of each Guarantor under this Guaranty shall be absolute,unconditional and irrevocable irrespective of: (1) any lack of validity, legality or enforceabilityof the Second Amended and Restated Credit Agreement, any Note or any other Loan Document or anyLender Hedging Agreement; (2) the failure of any Lender or any holder of any Note (a) to assert anyclaim or demand or to enforce any right or remedy against the Borrower, any other Obligor or anyother Person (including any other guarantor) under the provisions of the Second Amended andRestated Credit Agreement, any Note, any other Loan Document, any Lender Hedging Agreement orotherwise, or (b) to exercise any right or remedy against any other guarantor of, or collateralsecuring, any Obligations of the Borrower or any other Obligor; (3) any change in the time, manneror place of payment of, or in any other term of, all or any of the Obligations of the Borrower orany other Obligor, or any other extension, compromise or renewal of any Obligations of the Borroweror any other Obligor; (4) any reduction, limitation, impairment or termination of any Obligationsof the Borrower or any other Obligor for any reason, including any claim of waiver, release,surrender, alteration or compromise, and shall not be subject to (and each Guarantor hereby waivesany right to or claim of) any defense or setoff, counterclaim, recoupment or termination whatsoeverby reason of the invalidity, illegality, nongenuineness, irregularity, compromise, unenforceabilityof, or any other event or occurrence affecting, any Obligations of the Borrower, any other Obligoror otherwise; (5) any amendment to, rescission, waiver, or other modification of, or any consent todeparture from, any of the terms of the Second Amended and Restated Credit Agreement, any Note orany other Loan Document or any Lender Hedging Agreement; (6) any addition, exchange, release,surrender or non-perfection of any collateral, or any amendment to or waiver or release or additionof, or consent to departure from, any other guaranty, held by any Lender or any holder of any Notesecuring any of the Obligations of the Borrower or any other Obligor; (7) the insolvency orbankruptcy of, or similar event affecting, the Borrower or any other Obligor; or (8) any othercircumstance which might otherwise constitute a defense available to, or a legal or equitabledischarge of, the Borrower, any other Obligor, any surety or any guarantor. Each Guarantor
4

 
waives all rights and defenses which may arise with respect to any of the foregoing, and eachGuarantor waives any right to revoke this Guaranty with respect to future indebtedness. EachGuarantor waives all rights or defenses under (1) *Section 34.01**et**seq**. of theTexas Business and Commerce Code*, as amended, (2) *Section 17.001 of the Texas Civil Practice andRemedies Code*, as amended, (3) *Rule 31 of the Texas Rules of Civil Procedure*, as amended, or (4)common law, in equity, under contract, by statute, or otherwise.     **SECTION 2.4****Reinstatement**. Each Guarantor agrees that this Guaranty shall continue tobe effective or be reinstated, as the case may be, if at any time any payment (in whole or in part)of any of the Obligations is rescinded or must otherwise be restored by any Lender or any holder ofany Note, upon the insolvency, bankruptcy or reorganization of the Borrower, any other Obligor orotherwise, all as though such payment had not been made.     **SECTION 2.5****Waiver, etc.** The Guarantors hereby waive promptness, diligence, noticeof acceptance and any other notice with respect to any of the Obligations of the Borrower or anyother Obligor and this Guaranty and any requirement that the Administrative Agent, any other Lenderor any holder of any Note protect, secure, perfect or insure any security interest or Lien, or anyproperty subject thereto, or exhaust any right or take any action against the Borrower, any otherObligor or any other Person (including any other guarantor) or entity or any collateral securingthe Obligations of the Borrower or any other Obligor, as the case may be.     **SECTION 2.6****Waiver of Subrogation**. Until the Obligations are paid in full, allCommitments have terminated and all Lender Hedging Agreements have terminated, the Guarantors shallnot enforce or exercise any claim or other rights which they may now or hereafter acquire againstthe Borrower or any other Obligor that arise from the existence, payment, performance orenforcement of any Guarantor’s obligations under this Guaranty or any other Loan Document,including any right of subrogation, reimbursement, exoneration, or indemnification, any right toparticipate in any claim or remedy of the Lenders against the Borrower or any other Obligor or anycollateral which the Administrative Agent now has or hereafter acquires, whether or not such claim,remedy or right arises in equity, or under contract, statute or common law, including the right totake or receive from the Borrower or any other Obligor, directly or indirectly, in cash or otherproperty or by set-off or in any manner, payment or security on account of such claim or otherrights. If any amount shall be paid to any Guarantor in violation of the preceding sentence, suchamount shall be deemed to have been paid to such Guarantor for the benefit of, and held in trustfor, the Lenders, and shall forthwith be paid to the Lenders by the Guarantor receiving suchpayment to be credited and applied upon the Obligations, whether matured or unmatured. EachGuarantor acknowledges that it will receive direct and indirect benefits from the financingarrangements contemplated by the Second Amended and Restated Credit Agreement and that the waiverset forth in this Section is knowingly made in contemplation of such benefits.     **SECTION 2.7****Payments Free and Clear of Taxes, etc.** Each Guarantor hereby agreesthat:     (a) All payments by such Guarantor hereunder shall be made in accordance with ***Section 3.01***ofthe Second Amended and Restated Credit Agreement free and clear of and without deduction for anyand all present or future taxes, duties, levies, imposts, deductions, assessments, fees,withholdings or similar charges, and all liabilities with respect thereto; *excluding*, in the caseof the Administrative Agent and each Lender, (i) taxes imposed on or measured by its net income,and franchise taxes (including the Texas franchise tax) imposed on it (in lieu of net incometaxes), by the United States or any state or political subdivision thereof, or by the jurisdiction(or any political subdivision thereof) under the Laws of
5

 
which the Administrative Agent or such Lender, as the case may be, is organized, is or shouldbe qualified to do business or maintains its Lending Office, (ii) any branch profits taxes imposedby the United States or any similar tax imposed by any other jurisdiction described in clause(i) above, (iii) in the case of a Foreign Lender, any withholding tax that is imposed onamounts payable to such Foreign Lender at the time such Foreign Lender becomes a party to theSecond Amended and Restated Credit Agreement (or designates a new lending office) or isattributable to such Foreign Lender’s failure to comply with Section 3.01(f) of the SecondAmended and Restated Credit Agreement, except to the extent that such Foreign Lender (or itsassignor, if any) was entitled, at the time of designation of a new lending office (or assignment),to receive additional amounts from the Borrower with respect to such withholding tax pursuant toSection 3.01(a) of the Second Amended and Restated Credit Agreement and which withholdingtax may not be eliminated by complying with Section 3.01(f) of the Second Amended andRestated Credit Agreement, and (iv) any backup withholding tax required to be withheld or paidpursuant to Section 3406 of the Code (all such non-excluded taxes, duties, levies, imposts,deductions, assessments, fees, withholdings or similar charges, and liabilities being hereinafterreferred to as “***Taxes***”). If such Guarantor shall be required by any Laws to deduct any Taxes fromor in respect of any sum payable under any Loan Document to the Administrative Agent or any Lender,(1) the sum payable shall be increased as necessary so that after making all required deductions(including deductions applicable to additional sums payable under this Section), each of theAdministrative Agent and such Lender receives an amount equal to the sum it would have received hadno such deductions been made, (2) such Guarantor shall make such deductions, (3) such Guarantorshall pay the full amount deducted to the relevant taxation authority or other authority inaccordance with applicable Laws, and (4) within 30 days after the date of such payment, suchGuarantor shall furnish to the Administrative Agent the original or a certified copy of a receiptevidencing payment thereof.     (b) If a Guarantor fails to pay any Taxes when due to the appropriate taxing authority orfails to remit to any Lender the required receipts or other required documentary evidence, suchGuarantor shall indemnify such Lender for any incremental Taxes, interest or penalties that maybecome payable by such Lender as a result of any such failure.     (c) Without prejudice to the survival of any other agreement of the Guarantors hereunder, theagreements and obligations of the Guarantors contained in this ***Section 2.7***shall survive thepayment in full of the principal of and interest on the Loans.     **SECTION 2.8****Contribution Agreement**. Upon full and final payment of the Obligations,each Guarantor and all other Subsidiary Guarantors which have made payments upon all or any part ofthe Obligations shall be entitled to contribution from all of the other Guarantors and SubsidiaryGuarantors, to the end that all such payments upon the Obligations shall be shared among allGuarantors and Subsidiary Guarantors who guaranteed such Obligations in proportion to theirrespective Net Worths (defined below); *provided*that the contribution obligations of each of theGuarantors and Subsidiary Guarantors shall be limited to the maximum amount that it can pay at suchtime without rendering its contribution obligations voidable under applicable law relating tofraudulent conveyances or fraudulent transfers. As used in this subsection, the “Net Worth” of eachof the Guarantors and Subsidiary Guarantors means, at any time, the remainder of (i) the fair valueof such Guarantor’s assets (other than such right of contribution), minus (ii) the fair value ofsuch Guarantor’s liabilities (other than its liabilities under its guaranty of the Obligations).     **SECTION 2.9****Subordination**. Each Guarantor hereby subordinates and makes inferior tothe Obligations any and all indebtedness now or at any time hereafter owed by the Borrower or other Obligor
6

 
to such Guarantor. Each Guarantor agrees that after the occurrence of any Default or Event ofDefault under the Second Amended and Restated Credit Agreement, it will not permit the Borrower torepay such indebtedness or any part thereof and it will not accept payment from the Borrower ofsuch indebtedness or any part thereof without the prior written consent of the Required Lenders. Ifa Guarantor receives any such payment without the prior required written consent, the amount sopaid shall be held in trust for the benefit of the Lenders, shall be segregated from the otherfunds of such Guarantor, and shall forthwith be paid over to the Administrative Agent to be held bythe Administrative Agent as collateral for, or then or at any time thereafter applied in whole orin part by the Administrative Agent against, all or any portions of the Obligations, whethermatured or unmatured, in such order as the Administrative Agent shall elect.ARTICLE IIIREPRESENTATIONS, WARRANTEES AND COVENANTS     **SECTION 3.1****Representations, Warranties and Covenants**. By execution hereof, eachGuarantor covenants and agrees that the representations and warranties set forth in Sections 5.01,5.02, 5.03, 5.04, 5.06, 5.07, 5.08, 5.15, 5.18 and 5.23 of the Second Amended and Restated CreditAgreement are applicable to such Guarantor and such Guarantor reaffirms that each suchrepresentation and warranty is true and correct as to it. By execution hereof, each Guarantorcovenants and agrees that the terms, covenants, and conditions set forth in Sections 10.05, 10.16and 10.17 of the Second Amended and Restated Credit Agreement are applicable to such Guarantor andshall be imposed upon such Guarantor, and such Guarantor covenants and agrees to promptly andproperly perform, observe, and comply with each such term, covenant, or condition applicable to it.Moreover, each Guarantor acknowledges and agrees that this Guaranty is subject to the offsetprovisions of the Second Amended and Restated Credit Agreement in favor of the Administrative Agent and the Lenders.ARTICLE IVMISCELLANEOUS PROVISIONS     **SECTION 4.1****Loan Document**. This Guaranty is a Loan Document executed pursuant to theSecond Amended and Restated Credit Agreement and shall (unless otherwise expressly indicatedherein) be construed, administered and applied in accordance with the terms and provisions thereof.     **SECTION 4.2****Releases**. At such time as the Loans shall have been paid in full, theCommitments have been terminated, and, subject to ***Section 10.******01(e)*** of the Second Amended andRestated Credit Agreement, no Lender Hedging Agreements are outstanding, the Administrative Agentshall, at the request and expense of the Guarantors following such termination, promptly executeand deliver to the Guarantors such documents and instruments as the Guarantors shall reasonablyrequest to evidence termination and release of this Guaranty.     **SECTION 4.3****Administrative Agent and Lenders; Successors and Assigns****.**     (a) The Administrative Agent is Administrative Agent for each Lender under the Second Amendedand Restated Credit Agreement. All rights granted to Administrative Agent under or in connectionwith this Guaranty are for each Lender’s ratable benefit. The Administrative Agent may, without thejoinder of any Lender, exercise any rights in Administrative Agent’s or Lenders’ favor under or inconnection with this Guaranty. The Administrative Agent’s and each Lender’s rights and obligations
7

 
vis-a-vis each other may be subject to one or more separate agreements between those parties.However, the Guarantors are not required to inquire about any such agreement and are not subject toany terms of it unless the Guarantors specifically enter into such agreement. Therefore, neitherGuarantors nor any of their successors or assigns are entitled to any benefits or provisions of anysuch separate agreement nor are they entitled to rely upon or raise as a defense any party’sfailure or refusal to comply with the provisions of any such agreement.     (b) This Guaranty benefits the Administrative Agent, the Lenders, and their respectivesuccessors and assigns and binds each Guarantor and its successors and assigns. Upon appointment ofany successor Administrative Agent under the Second Amended and Restated Credit Agreement, all ofthe rights of Administrative Agent under this Guaranty automatically vests in that newAdministrative Agent as successor Administrative Agent on behalf of Lenders without any furtheract, deed, conveyance, or other formality other than that appointment. The rights of theAdministrative Agent and the Lenders under this Guaranty may be transferred with any assignment ofthe obligations hereby guaranteed pursuant to and in accordance with the terms of the SecondAmended and Restated Credit Agreement. The Second Amended and Restated Credit Agreement containsprovisions governing assignments of the obligations guaranteed under this Guaranty.     **SECTION 4.4****Amendments, etc.** No amendment to or waiver of any provision of thisGuaranty, nor consent to any departure by any Guarantor herefrom, shall in any event be effectiveunless the same shall be in writing and signed by or on behalf of the party against whom it issought to be enforced and is in conformity with the requirements of ***Section 10.01***of the SecondAmended and Restated Credit Agreement. Each such waiver or consent shall be effective only in thespecific instance and for the specific purpose for which given.     **SECTION 4.5****Addresses for Notices to the Guarantors**. All notices and othercommunications hereunder to the Guarantors shall be in writing and mailed or delivered to it,addressed to it at the address set forth below or at such other address as shall be designated bythe Guarantors in a written notice to the Administrative Agent at the address specified in theSecond Amended and Restated Credit Agreement complying as to delivery with the terms of thisSection. All such notices and other communications shall, when mailed, be effective when depositedin the mail, addressed as aforesaid. Address for notices:5075 Westheimer, Suite 890