Exhibit 10.4

FIRST AMENDMENT TO

AMENDED AND RESTATED CREDIT AGREEMENT

THIS FIRST AMENDMENT TO AMENDED AND RESTATED CREDIT AGREEMENT (this “First
Amendment”), dated as of December 18, 2012, among POWERSECURE INTERNATIONAL,
INC., a Delaware corporation (the “Borrower”), the lenders as identified as
Lenders on the signature pages hereof (collectively, the “Lenders”) and
CITIBANK, N.A., in its capacity as Administrative Agent (the “Administrative
Agent”).

BACKGROUND

A. The Borrower, the Lenders, and the Administrative Agent are parties to that
certain Amended and Restated Credit Agreement, dated as of December 21, 2011
(said Credit Agreement, as amended and restated, the “Credit Agreement”; the
terms defined in the Credit Agreement and not otherwise defined herein shall be
used herein as defined in the Credit Agreement).

B. The Borrower, the Lenders and the Administrative Agent desire to amend the
Credit Agreement.

NOW, THEREFORE, in consideration of the covenants, conditions and agreements
hereafter set forth, and for other good and valuable consideration, the receipt
and adequacy of which are all hereby acknowledged, the parties hereto covenant
and agree as follows:

1. AMENDMENT. The definition of “Stock Repurchase Program” set forth in
Section 1.01 of the Credit Agreement is amended to read as follows:

“Stock Repurchase Program” means that certain stock repurchase program approved
by the Board of Directors of the Borrower whereby the Borrower may purchase
common Equity Interests of the Borrower, for an aggregate amount not to exceed
$10,000,000, consisting of (i) $5,000,000 of common Equity Interests that the
Borrower may purchase over the twenty-four month period commencing November,
2011, and (ii) an additional $5,000,000 of common Equity Interests that the
Borrower may purchase over the twenty-four month period commencing December,
2012.

2. REPRESENTATIONS AND WARRANTIES. By its execution and delivery hereof, the
Borrower represents and warrants that, as of the date hereof:

(a) the representations and warranties contained in the Credit Agreement and the
other Loan Documents are true and correct on and as of the date hereof as made
on and as of such date, except to the extent that such representations and
warranties specifically refer to an earlier date, in which case they are true
and correct as of such earlier date, and except that the representations
contained in subsections (a) and (b) of Section 5.05 of the Credit Agreement
shall be deemed to refer to the most recent statements furnish pursuant to
subsections (a) and (b), respectively, of Section 6.01 of the Credit Agreement;

(b) no event has occurred and is continuing which constitutes a Default or an
Event of Default;

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

(c) (i) the Borrower has full power and authority to execute and deliver this
First Amendment, (ii) this First Amendment has been duly executed and delivered
by the Borrower, and (iii) this First Amendment and the Credit Agreement, as
amended hereby, constitute the legal, valid and binding obligations of the
Borrower, enforceable in accordance with their respective terms, except as
enforceability may be limited by applicable Debtor Relief Laws and by general
principles of equity (regardless of whether enforcement is sought in a
proceeding in equity or at law) and except as rights to indemnity may be limited
by federal or state securities laws;

(d) neither the execution, delivery and performance of this First Amendment or
the Credit Agreement, as amended hereby, nor the consummation of any
transactions contemplated herein or therein, will violate any Law or conflict
with any Organization Documents of the Borrower, or any indenture, agreement or
other instrument to which the Borrower or any of it property is subject; and

(e) no authorization, approval, consent, or other action by, notice to, or
filing with, any Governmental Authority or other Person not previously obtained
is required for (i) the execution, delivery or performance by the Borrower, of
this First Amendment or (ii) the acknowledgement by each Guarantor of this First
Amendment.

3. CONDITIONS TO EFFECTIVENESS. All provisions of this First Amendment shall be
effective upon satisfaction or completion of the following:

(a) the Administrative Agent shall have received counterparts of this First
Amendment executed by the Lenders;

(b) the Administrative Agent shall have received counterparts of this First
Amendment executed by the Borrower and acknowledged by each Guarantor; and

(c) the Administrative Agent shall have received, in form and substance
satisfactory to the Administrative Agent and its counsel, such other documents,
certificates and instruments as the Administrative Agent shall require.

4. REFERENCE TO THE CREDIT AGREEMENT.

(a) Upon the effectiveness of this First Amendment, each reference in the Credit
Agreement to “this Agreement”, “hereunder”, or words of like import shall mean
and be a reference to the Credit Agreement, as affected and amended hereby.

(b) The Credit Agreement, as amended by the amendments referred to above, shall
remain in full force and effect and is hereby ratified and confirmed.

5. COSTS, EXPENSES AND TAXES. The Borrower agrees to pay on demand all costs and
expenses of the Administrative Agent in connection with the preparation,
reproduction, execution and delivery of this First Amendment and the other
instruments and documents to be delivered hereunder (including the reasonable
fees and out-of-pocket expenses of counsel for the Administrative Agent with
respect thereto).

 

2

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

6. GUARANTOR’S ACKNOWLEDGMENT. By signing below, each Guarantor
(a) acknowledges, consents and agrees to the execution, delivery and performance
by the Borrower of this First Amendment, (b) acknowledges and agrees that its
obligations in respect of its Guaranty (i) are not released, diminished, waived,
modified, impaired or affected in any manner by this First Amendment or any of
the provisions contemplated herein and (ii) cover the Aggregate Revolving
Commitments as increased by this First Amendment, (c) ratifies and confirms its
obligations under its Guaranty, and (d) acknowledges and agrees that it has no
claims or offsets against, or defenses or counterclaims to, its Guaranty.

7. EXECUTION IN COUNTERPARTS. This First Amendment may be executed in any number
of counterparts and by different parties hereto in separate counterparts, each
of which when so executed and delivered shall be deemed to be an original and
all of which when taken together shall constitute but one and the same
instrument. For purposes of this First Amendment, a counterpart hereof (or
signature page thereto) signed and transmitted by any Person party hereto to the
Administrative Agent (or its counsel) by facsimile machine, telecopier or
electronic mail is to be treated as an original. The signature of such Person
thereon, for purposes hereof, is to be considered as an original signature, and
the counterpart (or signature page thereto) so transmitted is to be considered
to have the same binding effect as an original signature on an original
document.

8. GOVERNING LAW; BINDING EFFECT. This First Amendment shall be governed by and
construed in accordance with the laws of the State of New York applicable to
agreements made and to be performed entirely within such state, provided that
each party shall retain all rights arising under federal law, and shall be
binding upon the parties hereto and their respective successors and assigns;
provided, however, that the Borrower may not assign any of its rights arising
from this First Amendment or any other Loan Document, and any prohibited
assignment shall be null and void.

9. HEADINGS. Section headings in this First Amendment are included herein for
convenience of reference only and shall not constitute a part of this First
Amendment for any other purpose.

10. ENTIRE AGREEMENT. THE CREDIT AGREEMENT, AS AMENDED BY THIS FIRST AMENDMENT,
AND THE OTHER LOAN DOCUMENTS REPRESENT THE FINAL AGREEMENT BETWEEN THE PARTIES
AND MAY NOT BE CONTRADICTED BY EVIDENCE OF PRIOR, CONTEMPORANEOUS, OR SUBSEQUENT
ORAL AGREEMENTS BETWEEN THE PARTIES. THERE ARE NO UNWRITTEN ORAL AGREEMENTS
BETWEEN THE PARTIES.

 

3

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

IN WITNESS WHEREOF, the parties hereto have executed this First Amendment as of
the date first above written.

 

POWERSECURE INTERNATIONAL, INC. By:  

/s/ Christopher T. Hutter

  Christopher T. Hutter   Executive Vice President, Chief Financial Officer

 

Signature Page – Seventh Amendment

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

CITIBANK, N.A., as Administrative Agent and Lender By:  

/s/ Gary D. Pitcock

  Gary D. Pitcock   Vice President

 

Signature Page – Seventh Amendment

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

BRANCH BANKING AND TRUST COMPANY, as Lender By:  

/s/ Steven G. Bullard

  Name: Steven G. Bullard   Title: Senior Vice President

 

Signature Page – Seventh Amendment

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

ACKNOWLEDGED AND AGREED:

POWERSECURE, INC.

POWERSERVICES, INC.

ENERGYLITE, INC.

UTILITYENGINEERING, INC.

UTILITYDESIGN, INC.

WATERSECURE HOLDINGS, INC. (f/k/a Marcum Gas Transmission, Inc.)

REID’S TRAILER, INC.

EFFICIENTLIGHTS, LLC

POWERPACKAGES, LLC

MARCUM GAS METERING, INC. (f/k/a Metretek, Incorporated)

INNOVATIVE ELECTRONIC SOLUTIONS LIGHTING, LLC

POWERSECURE HAITI USA, INC.

INNOVATION ENERGIES, LLC

SOUTHERN ENERGY MANAGEMENT POWERSECURE, LLC

 

By:  

/s/ Christopher T. Hutter

  Christopher T. Hutter   Chief Financial Officer for all

 

Signature Page – Seventh Amendment