Exhibit 10

FIRST AMENDMENT TO SECOND

AMENDED AND RESTATED CREDIT AGREEMENT

(Various Amendments; Mergers of Hake Group Entities)

THIS FIRST AMENDMENT TO SECOND AMENDED AND RESTATED CREDIT AGREEMENT (this
“Amendment”) is effective as of the 6th day of July, 2007 (the “Amendment
Effective Date”).

RECITALS

WHEREAS, MATRIX SERVICE COMPANY, a Delaware corporation (the “Borrower”),
JPMORGAN CHASE BANK, N.A., as Administrative Agent (the “Administrative Agent”)
and as a Lender and Issuing Bank, and the financial institutions therein named
as Lenders, are parties to that certain Second Amended and Restated Credit
Agreement dated as November 30, 2006 (the “Credit Agreement”);

WHEREAS, all capitalized terms used but not defined in these Recitals shall have
the meanings assigned to them in the Credit Agreement;

WHEREAS, certain members of the Hake Group have merged into other Subsidiaries,
and pursuant to Section 6.03(a) of the Credit Agreement, the Lenders have
required that the Borrower agree to the terms of this Amendment and that the
Subsidiaries execute and deliver to the Lenders certain documents and
instruments as described below; and

WHEREAS, the Borrower has requested amendments to certain of the covenants and
other provisions of the Credit Agreement, and the Lenders have agreed, as set
forth in this Amendment.

NOW THEREFORE, in consideration of the mutual agreements, provisions and
covenants contained herein, the parties hereto agree as follows:

Section 1. Incorporation by Reference; Defined Terms. Capitalized terms used but
not defined in this Amendment (including the Recitals) shall have the meanings
given to them in the Credit Agreement. All terms defined in the foregoing
Recitals are incorporated herein by reference.

The term “Loan Documents” is hereby amended to include the Credit Agreement, as
amended by this Amendment, all as they may be further amended from time to time
with the consent of the Administrative Agent and, to the extent required by the
Credit Agreement, the Lenders.

The term “Agreement”, as used in the Credit Agreement, is hereby amended to mean
the Credit Agreement, as amended by this Amendment and as it may be further
amended from time to time with the consent of the Administrative Agent and, to
the extent required by the Credit Agreement, the Lenders.

The term “Credit Agreement” in all other Loan Documents is hereby amended to
mean the Credit Agreement, as amended by this Amendment, as it may be further
amended from time to time with the consent of the Administrative Agent and, to
the extent required by the Credit Agreement, the Lenders.

--------------------------------------------------------------------------------

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

(a) Effective as of the Amendment Effective Date, the chart included in the
definition of “Applicable Rate” in the Credit Agreement is hereby replaced with
the following:

 

APPLICABLE RATE – Revolving Loans

Senior Leverage

Ratio

  

Eurodollar Spread

Applicable Rate (bps)

  

ABR Spread

Applicable Rate

(bps)

³ 2.00 to 1.00

   175    25

< 2.00 to 1.00

   150    0

< 1.50 to 1.00

   125    0

< 1.00 to 1.00

   100    0

(b) Effective as of the Amendment Effective Date, the chart included in
Section 2.12(a) of the Credit Agreement is hereby replaced with the following:

 

Senior Leverage Ratio

  

Unused Revolving Credit

Facility Fee (bps)

³ 2.00 to 1.00

   37.5

< 2.00 to 1.00

   25

< 1.50 to 1.00

   20

< 1.00 to 1.00

   17.5

(c) The definition of Fixed Charge Ratio is hereby amended and restated in its
entirety to read as follows, effective initially for the fiscal quarter ending
May 31, 2007:

 

     “Fixed Charge Coverage Ratio” means, as of the last day of any fiscal
quarter, the ratio determined as follows (with all calculations to be made for
Borrower and its Subsidiaries in accordance with GAAP on a consolidated basis):

 

     Numerator: Consolidated EBIT for the previous four fiscal quarters ending
on such day.

 

     Denominator: (i) net cash taxes paid for the previous four fiscal quarters
ending on such day, (ii) PLUS scheduled current maturities of the Hake Group
Acquisition carry-back financing for the next four fiscal quarters, (iii) PLUS
scheduled current maturities of any Indebtedness not described in (ii) above for
the next four fiscal quarters, (iv) PLUS Consolidated Interest Expense for the
previous four fiscal quarters ending on such day (excluding amounts included in
Consolidated Interest Expense for (A) amortization of deferred financing fees,
and (B) accretion related to the Hake Group Acquisition carry-back financing),
and (v) PLUS current maturities of Capital Lease Obligations for the next four
fiscal quarters.

(d) The following definition is hereby added to the Credit Agreement:

 

2

--------------------------------------------------------------------------------

“Consolidated EBIT” means, with reference to any period, Consolidated Net Income
for such period plus, to the extent deducted in calculating Consolidated Net
Income for such period, (i) Consolidated Interest Expense, and (ii) expense for
income taxes paid or accrued, all calculated for Borrower and its Subsidiaries
on a consolidated basis without duplication.

(e) In the definition of “Revolving Credit Termination Date,” November 30, 2011
is hereby replaced with November 30, 2012.

(f) Schedule 3.13 of the Credit Agreement is hereby replaced with Schedule 3.13
attached to this Amendment.

(g) The representations and warranties set forth in Sections 6 (b), (c), (d),
(e), (f), (g), (h) and (i) of this Amendment are hereby incorporated into and
made a part of Article III of the Credit Agreement.

(h) Section 6.03(a) is hereby amended to read as follows:

SECTION 6.03 (a) The Borrower will not, and will not permit any Subsidiary to,
merge into or consolidate with any other Person, or permit any other Person to
merge into or consolidate with it, or sell, transfer, lease or otherwise dispose
of (in one transaction or in a series of transactions) any of the stock of any
of its Subsidiaries (in each case, whether now owned or hereafter acquired), or
liquidate or dissolve, except that, if at the time thereof and immediately after
giving effect thereto no Default shall have occurred and be continuing (i) any
Subsidiary may merge into the Borrower in a transaction in which the Borrower is
the surviving corporation, (ii) any Subsidiary may merge into any Subsidiary in
a transaction in which the surviving entity is a Subsidiary, and (iii) any
Subsidiary may sell, transfer, lease or otherwise dispose of all its assets to
the Borrower or to another Subsidiary and subsequently liquidate or dissolve;
provided that (A) at least thirty (30) days prior to the effectiveness of any of
those transactions described in (a) (i) (ii) and (iii), Borrower shall provide
to the Administrative Agent notice and a description of the material provisions
of such transaction, and (B) prior to the effectiveness of any such transaction,
Borrower shall provide to the Administrative Agent all documents, agreements and
instruments that Administrative Agent shall request relating to the Liens
against property of any Subsidiary and the perfection thereof.

(i) Section 6.10 Capital Expenditures is hereby deleted in its entirety and
replaced with the following:

SECTION 6.10 Reserved.

(j) Schedule 7(v) of the Credit Agreement is hereby replaced with Schedule 7(v)
attached to this Amendment.

(k) Schedule 7(w) of the Credit Agreement is hereby replaced with Schedule 7(w)
attached to this Amendment.

 

3

--------------------------------------------------------------------------------

(l) The Compliance Certificate attached as Exhibit C to the Credit Agreement is
hereby replaced with Exhibit C attached to this Amendment.

Section 3. Mergers. The parties agree that the execution and delivery of this
Amendment and the documents contemplated by this Amendment shall satisfy all
requirements of Section 6.03(a) of the Credit Agreement as such section is
applicable to the Mergers (as that term is defined below).

Section 4. Effect of this Amendment. This Amendment shall not be deemed to be a
waiver of, amendment to, consent to or modification of any term or provision of
the Credit Agreement or of any term or provision of any of the other Loan
Documents, except as specifically set forth herein, and this Amendment shall not
be deemed to be a waiver of, amendment to, or consent to or modification of any
event, condition, or transaction on the part of the Borrower or any other Person
except as specifically set forth herein.

Section 5. Conditions. This Amendment shall be effective as of the Amendment
Effective Date, provided the following conditions precedent are satisfied:

(a) Administrative Agent’s receipt of the following, each of which shall be
originals or facsimiles (followed promptly by originals) unless otherwise
specified, each properly executed, each dated the Amendment Effective Date (or,
in the case of certificates of governmental officials, a recent date before the
date of the Amendment) and each in form and substance satisfactory to
Administrative Agent and its legal counsel:

(i) executed counterparts of this Amendment and all other documents and
instruments requested by Administrative Agent, sufficient in number for
distribution to each Lender and Borrower;

(ii) a corporate certificate with resolutions in the form required by
Administrative Agent;

(iii) a favorable written opinion (addressed to the Administrative Agent and the
Lenders and dated the Amendment Effective Date) of Conner & Winters, counsel for
the Borrower, substantially in the form of Annex 1 attached to this Amendment,
covering such matters relating to the Borrower and the Subsidiaries and this
Amendment as the Administrative Agent shall request, and the Borrower hereby
requests such counsel to deliver such opinion;

(iv) such other certificates of resolutions or other action, incumbency
certificates and/or other certificates of Authorized Officers of each Credit
Party as Lender may require evidencing the identity, authority and capacity of
each Authorized Officer thereof authorized to act as an Authorized Officer in
connection with this Amendment and the other Loan Documents to which such Credit
Party is a party; and

(v) fully executed originals of the Ratification of and Amendment to Security
Agreement and Release and Ratification of and Amendment to Subsidiary Guaranty,
in the forms set forth on Schedules “1-A” and “1-B”, respectively, attached
hereto, for each party thereto (collectively the “Ratifications”);

 

4

--------------------------------------------------------------------------------

(b) Administrative Agent’s receipt of such other assurances, certificates,
documents, consents, and opinions as Administrative Agent reasonably may
require;

(c) Borrower shall have paid to Administrative Agent, for payment to the
Lenders, loan fees in the amount of five (5) basis points times the amount of
each Lender’s Commitment, for a total of $37,500.00; and

(d) unless waived by Administrative Agent, Borrower shall have paid all fees,
expenses and disbursements of any law firm or other external counsel for
Administrative Agent to the extent invoiced prior to the date hereof, plus such
additional amounts of such fees, expenses and disbursements as shall constitute
its reasonable estimate thereof incurred or to be incurred by it through the
closing proceedings as to this Amendment (provided that such estimate shall not
thereafter preclude a final settling of accounts between Borrower and
Administrative Agent).

Section 6. Acknowledgment and Ratification; Representations and Warranties. The
Borrower acknowledges and agrees that the Credit Agreement shall remain in full
force and effect as amended hereby. Borrower represents and warrants to the
Lenders that as of the date of execution of this Amendment and as of the
Amendment Effective Date:

(a)(i) the representations and warranties set forth in the Credit Agreement are
true and correct in all material respects as though made on the date hereof,
except to the extent that any of them speak to a different specific date, in
which case they are true and correct as of such earlier date, and for purposes
of this Amendment the representations and warranties contained in subsection
(a) of Section 3.04 shall be deemed to refer to the most recent financial
statements furnished by the Borrower pursuant to clauses (a) and (b) of
Section 5.01, and (ii) no Default or Event of Default exists;

(b)(i) On or about December 21, 2006, I & S Joint Venture, L.L.C., a
Pennsylvania limited liability company, and Hover Systems, Inc., a Pennsylvania
corporation, merged with and into I & S, Inc., a Pennsylvania corporation
(“I&S”), and (ii) I&S is the surviving entity of such mergers;

(c)(i) On or about December 26, 2006, Hake Group, Inc., a Delaware corporation,
merged with and into Matrix Service Industrial Contractors, Inc., an Oklahoma
corporation (“MSIC”), and (ii) MSIC is the surviving entity of such merger;

(d) On or about December 31, 2006, the following entities merged with and into
MSIC, with MSIC the surviving entity: (A) Bish Investments, Inc., a Delaware
corporation, (B) Mechanical Construction, Incorporated, a Delaware corporation,
(C) Bogan, Inc., a Pennsylvania corporation, (D) McBish Management, Inc., a
Pennsylvania corporation, (E) Mid-Atlantic Constructors, Inc., a Pennsylvania
corporation, and (F) Talbot Realty, Inc., a Pennsylvania corporation. (The
mergers described this subsection and in subsections (b) and (c) above are
hereinafter collectively referred to as the “Mergers”);

(e)(i) Schedule 3.13 contains a list all Subsidiaries of the Borrower as of the
Amendment Effective Date, setting forth their respective jurisdictions of
organization and the percentage of their respective capital stock or other
ownership interests owned by the Borrower or other Subsidiaries, and all such
information, and all other information on Schedule 3.13, is true and complete as
of the Amendment Effective Date, and (ii) all of the

 

5

--------------------------------------------------------------------------------

issued and outstanding shares of capital stock or other ownership interests of
the Subsidiaries have been (to the extent such concepts are relevant with
respect to such ownership interests) duly authorized and issued and fully paid
and non-assessable;

(f) As of the Amendment Effective Date, neither the Borrower nor any of the
Subsidiaries owns or has any interest in any “commercial tort claim” (as that
term is defined in 12A Okla. Stat. § 1-9-102(a)(13) as of the Amendment
Effective Date) that has not been specifically described in a Security Agreement
as part of the collateral thereunder;

(g) the execution, delivery and performance by the Borrower of this Amendment
have been duly authorized by all necessary corporate action and do not and will
not contravene the terms of any of the Borrower’s organizational documents, any
law or any indenture, loan or credit agreement, or any other material agreement
or instrument to which the Borrower is a party or by which it is bound or to
which it or its properties are subject;

(h) no authorizations, approvals or consents of, and no filings or registrations
with, any Governmental Authority or any other Person are necessary for the
execution, delivery or performance by the Borrower of this Amendment or for the
validity or enforceability thereof, other than routine informational filings
with the SEC and/or other Governmental Authorities; and

(i) this Amendment constitutes the legal, valid and binding obligations of the
Borrower, enforceable against the Borrower in accordance with its terms, and the
Ratifications constitute the legal, valid and binding obligations of the
Subsidiaries party thereto, enforceable agreement such Subsidiaries in
accordance with their terms, in all cases except as limited by applicable
bankruptcy, insolvency, reorganization, moratorium or other similar laws
affecting the enforcement of creditors’ rights generally or by equitable
principles relating to enforceability, and by judicial discretion regarding the
enforcement of or any applicable laws affecting remedies (whether considered in
a court of law or a proceeding in equity).

Section 7. Defaults Unaffected. Except as may be expressly set forth herein,
nothing contained in this Amendment shall prejudice, act as, or be deemed to be
a waiver of any Default or Event of Default or any right or remedy available to
Administrative Agent or any Lender by reason of the occurrence or existence of
any fact, circumstance or event constituting a Default or Event of Default.

Section 8. Releases. Borrower, for itself and on behalf of all its predecessors,
successors, assigns, agents, employees, representatives, officers, directors,
general partners, limited partners, joint shareholders, beneficiaries, trustees,
administrators, subsidiaries, affiliates, employees, servants and attorneys
(collectively the “Releasing Parties”), hereby releases and forever discharges
Administrative Agent, the Issuing Bank and each Lender and their respective
successors, assigns, partners, directors, officers, agents, attorneys, and
employees from any and all claims, demands, cross-actions, controversies, causes
of action, damages, rights, liabilities and obligations, at law or in equity
whatsoever, known or unknown, whether past, present or future, now held, owned
or possessed by the Releasing Parties, or any of them, or which the Releasing
Parties or any of them may, as a result of any actions or inactions occurring on
or prior to the Amendment Effective Date, hereafter hold or claim to hold under
common law or statutory right, arising directly or indirectly out

 

6

--------------------------------------------------------------------------------

of the Loan or any of the Loan Documents or any of the documents, instruments or
any other transactions relating thereto or the transactions contemplated
thereby.

Borrower understands and agrees that this is a full, final and complete release
and agrees that this release may be pleaded as an absolute and final bar to any
or all suit or suits pending or which may hereafter be filed or prosecuted by
any of the Releasing Parties, or anyone claiming by, through or under any of the
Releasing Parties, in respect of any of the matters released hereby, and that no
recovery on account of the matters described herein may hereafter be had from
anyone whomsoever, and that the consideration given for this release is no
admission of liability.

Section 9. Governing Law; Miscellaneous. This Amendment shall be governed by the
internal laws of the State of Oklahoma. Unless stated otherwise, (a) the
singular number includes the plural and vice versa and words of any gender
include each other gender, in each case, as appropriate, (b) headings and
captions may not be construed in interpreting provisions, (c) this Amendment may
be executed in any number of counterparts with the same effect as if all
signatories had signed the same document, and all of those counterparts must be
construed together to constitute the same document, and (d) this Amendment shall
be effective when it has been executed by the parties hereto and each party has
notified the Administrative Agent by facsimile transmission or telephone that it
has taken such action.

 

7

--------------------------------------------------------------------------------

IN WITNESS WHEREOF, the parties have caused this Amendment to be duly executed
and delivered by their proper and duly authorized officers as of the day and
year first above written.

 

MATRIX SERVICE COMPANY, a Delaware corporation

By:

 

/s/ George L. Austin

  George L. Austin, Vice President

 

8

--------------------------------------------------------------------------------

JPMORGAN CHASE BANK, N.A.,

as Administrative Agent, Lender

and Issuing Bank

By:

 

/s/ J. Barton Kalsu

  J. Barton Kalsu, Vice President

 

9

--------------------------------------------------------------------------------

WACHOVIA BANK, NATIONAL ASSOCIATION

By:

 

/s/ Gideon Oosthuizen

  Gideon Oosthuizen, Vice President

 

10

--------------------------------------------------------------------------------

AMEGY BANK NATIONAL ASSOCIATION

By:

 

/s/ Cyndi M. Giles

  Cyndi M. Giles, Vice President

 

11

--------------------------------------------------------------------------------

LASALLE BANK NATIONAL ASSOCIATION

By:

 

/s/ Steve Trepiccione

  Steve Trepiccione, Senior Vice President

 

12

--------------------------------------------------------------------------------

BMO CAPITAL MARKETS FINANCE, INC.

By:

 

/s/ Edward J. Klinger

  Edward J. Klinger, Vice President

 

13

--------------------------------------------------------------------------------

INDEX TO SCHEDULES, EXHIBITS AND ANNEXES*

 

Schedule 1-A   —    Ratification of and Amendment to Security Agreement and
Release Schedule 1-B   —    Ratification of and Amendment to Subsidiary Guaranty
Schedule 3.13   —    Subsidiaries (List of All Subsidiaries, with Jurisdictions
of Organization, Ownership Percentages Held by
Borrower or other Subsidiaries) Schedule 7(v)   —    Entities that Will
Discontinue Business or Make a Material Change in the Nature of or Manner of
Business Schedule 7(w)   —    Entities that are not Required to Maintain
Permits; Properties to Be Released Exhibit C   —    Compliance Certificate Annex
1   —    Opinion of Counsel

* Omitted. The Company agrees to furnish supplementally a copy of any omitted
exhibit, schedule or similar attachment to the Securities and Exchange
Commission upon request.

 

14