EXHIBIT 10.1 EXECUTION VERSION ================================================================================ STOCK PURCHASE AGREEMENT BY AND AMONG ------------------------------- A SHAREHOLDER OF POWERSECURE, INC. AS SELLER AND METRETEK TECHNOLOGIES, INC. AS PURCHASER DATED AS OF SEPTEMBER 10, 2004 ================================================================================ TABLE OF CONTENTS Section 1. SALE AND PURCHASE OF THE POWERSECURE SHARES.......................1 Section 1.1 Sale and Purchase of the PowerSecure Shares.................1 Section 1.2 Metretek Shares.............................................1 Section 2. REPRESENTATIONS AND WARRANTIES OF SELLER..........................2 Section 2.1 Power and Authority.........................................2 Section 2.2 Enforceability..............................................2 Section 2.3 No Conflicts................................................2 Section 2.4 Consents....................................................2 Section 2.5 Proceedings.................................................2 Section 2.6 Status of PowerSecure Shares................................3 Section 2.7 Securities Representations as to the Metretek Shares........3 Section 3. REPRESENTATIONS AND WARRANTIES OF PURCHASER ......................5 Section 3.1 Organization................................................5 Section 3.2 Power and Authority.........................................5 Section 3.3 Enforceability..............................................5 Section 3.4 No Conflicts................................................5 Section 3.5 Consents....................................................5 Section 3.6 No Proceedings..............................................5 Section 3.7 Metretek Capitalization; Metretek Shares....................6 Section 3.8 Tax-Free Reorganization.....................................6 Section 4. ADDITIONAL COVENANTS..............................................6 Section 4.1 Consummation of Transactions................................6 Section 4.2 Public Announcements........................................6 Section 4.3 Ownership of PowerSecure Shares.............................6 Section 5. CONDITIONS PRECEDENT TO PURCHASER'S CLOSING OBLIGATIONS...........7 Section 5.1 Accuracy of Representations and Warranties..................7 Section 5.2 Performance of Covenants....................................7 Section 5.3 Proceedings and Documents Satisfactory......................7 Section 5.4 No Proceedings..............................................7 Section 5.5 No Claims for PowerSecure Shares............................7 Section 5.6 Deliveries at Closing.......................................7 Section 5.7 Consents....................................................8 Section 5.8 Purchaser Board Approval....................................8 Section 5.9 PIPE Investor Approval......................................8 Section 5.10 Securities Laws.............................................8 Section 5.11 Fairness Opinion............................................8 Section 5.12 Closing With Other PowerSecure Shareholders.................8 Section 6. CONDITIONS PRECEDENT TO SELLER'S OBLIGATIONS......................8 Section 6.1 Accuracy of Representations and Warranties..................8 Section 6.2 Performance of Covenants....................................8 Section 6.3 No Proceedings..............................................8 Section 6.4 Deliveries at Closing.......................................9 Section 6.5 Purchaser Board Approval....................................9 Section 6.6 PIPE Investor Approval......................................9 Section 7. THE CLOSING.......................................................9 Section 7.1 Date and Place..............................................9 Section 7.2 Deliveries by Seller........................................9 Section 7.3 Deliveries by Purchaser.....................................9 Section 7.4 Effectiveness of Closing...................................10 Section 8. SURVIVAL AND INDEMNIFICATION.....................................10 Section 8.1 Survival...................................................10 Section 8.2 Indemnification by Seller..................................10 Section 8.3 Indemnification by Purchaser...............................10 Section 8.4 Claims for Indemnification.................................10 Section 8.5 Non-Exclusive Indemnification..............................11 Section 8.6 Effect of Knowledge........................................11 Section 8.7 Contribution...............................................11 Section 9. TERMINATION AND CONFIDENTIALITY..................................12 Section 9.1 Events of Termination......................................12 Section 9.2 Effect of Termination......................................12 Section 9.3 Confidentiality............................................12 Section 10. GENERAL PROVISIONS...............................................12 Section 10.1 Governing Law..............................................12 Section 10.2 Expenses...................................................13 Section 10.3 Assignment.................................................13 Section 10.4 Successors and Assigns.....................................13 Section 10.5 Amendments.................................................13 Section 10.6 Notices....................................................13 Section 10.7 Waiver.....................................................14 Section 10.8 Severability...............................................14 Section 10.9 Headings...................................................14 Section 10.10 No Third Party Beneficiaries...............................14 Section 10.11 Construction...............................................15 Section 10.12 Schedule...................................................15 Section 10.13 Interpretation of Certain Provisions.......................15 Section 10.14 Specific Performance; Cumulative Remedies..................15 Section 10.15 Counterparts...............................................16 Section 10.16 Entire Agreement...........................................16 SCHEDULE Schedule I Seller, PowerSecure Share Holdings and Metretek Shares to be Received STOCK PURCHASE AGREEMENT This STOCK PURCHASE AGREEMENT (this "Agreement") is made and entered into as of September 10, 2004, by and between the person listed as the "Seller" on Schedule I hereto and signing as such on the Signature Page ("Seller"), and Metretek Technologies, Inc., a Delaware corporation ("Purchaser" or "Metretek"). W I T N E S S E T H: WHEREAS, PowerSecure, Inc., a Delaware corporation and majority-owned subsidiary of Metretek ("PowerSecure"), is engaged in the business of acting as a full-service integrator of distributed peak generation and energy information management systems; and WHEREAS, Seller owns issued and outstanding shares of Common Stock, par value $.01 per share ("PowerSecure Shares") of PowerSecure; and WHEREAS, Purchaser owns the majority of the outstanding PowerSecure Shares and desires to purchase all of the other issued and outstanding PowerSecure Shares from the holders thereof; and WHEREAS, Seller desires to sell, and Purchaser desires to purchase, all of the PowerSecure Shares owned by Seller, upon the terms and subject to the conditions set forth in this Agreement; NOW, THEREFORE, in consideration of the premises and the mutual covenants, agreements, representations and warranties set forth herein, and other good and valuable consideration, the receipt and sufficiency of which are hereby acknowledged, the parties hereto, intending to be legally bound hereby, agree as follows: SECTION 1. SALE AND PURCHASE OF THE POWERSECURE SHARES SECTION 1.1 SALE AND PURCHASE OF POWERSECURE SHARES. At the Closing (as defined below), upon the terms and subject to the conditions set forth in this Agreement, Seller shall sell, assign, transfer, convey and deliver to Purchaser, and Purchaser shall purchase and acquire from Seller, all right, title and interest of each Seller, legal or equitable, in and to the number of PowerSecure Shares set forth on Schedule I hereto, which shall constitute all of the issued and outstanding PowerSecure Shares owned by Seller on the Closing Date (as defined below). Seller understands, acknowledges and agrees that PowerSecure is purchasing PowerSecure Shares from other holders thereof (the "Other PowerSecure Shareholders") contemporaneously with the purchase contemplated by this Agreement. SECTION 1.2 METRETEK SHARES. In payment and consideration in full for the sale and transfer of the PowerSecure Shares by Seller to Purchaser, at the Closing, upon the terms and subject to the conditions set forth herein, Purchaser shall issue, sell and deliver to Seller the number of shares 1 of restricted common stock, par value $.01 per share, of Purchaser (the "Metretek Shares"), set forth on Schedule I. SECTION 2. REPRESENTATIONS AND WARRANTIES OF SELLER In order to induce Purchaser to enter into this Agreement and to perform its obligations hereunder, Seller does hereby represent and warrant to and for the benefit of Purchaser as follows: SECTION 2.1. POWER AND AUTHORITY. Seller has all requisite right, capacity, power and authority to execute and deliver this Agreement and to perform his obligations hereunder, including but not limited to the sale and transfer of Seller's PowerSecure Shares to Purchaser. SECTION 2.2. ENFORCEABILITY. This Agreement has been duly and validly executed and delivered by Seller and constitutes a legal, valid and binding obligation of Seller, enforceable against Seller in accordance with its terms. SECTION 2.3. NO CONFLICTS. The execution and delivery by Seller of this Agreement and the consummation of the transactions contemplated hereby, including but not limited to the sale and transfer of Seller's PowerSecure Shares to Purchaser, do not and will not, directly or indirectly, (a) violate, conflict with, or constitute a breach of or a default (or an event that, after the giving of notice or the lapse of time or both, would constitute a default) under any provision of (i) any contract, obligation, promise, understanding, arrangement, note, security agreement, mortgage, lease, license, bond, indenture, loan or credit agreement or other instrument, commitment or agreement ("Contract") to which Seller is a party or by which Seller or the PowerSecure Shares owned by Seller is or may be bound or affected; (ii) any federal, state, local or foreign law, statute, rule or regulation, or any order, injunction, writ, judgment, decree or ruling of any court, arbitrator or Governmental Authority applicable to the Company, or any assets or properties of the Company, except where such violation, conflict, breach or default would not have a material adverse effect upon the ability of Seller to consummate the transactions contemplated hereby; or (b) result in the creation or imposition of any mortgage, lien, pledge, security interest or any other encumbrance, claim or restriction of any kind or description against the PowerSecure Shares. SECTION 2.4. CONSENTS. No consent, authorization, permit or approval of, notice or report to, filing or registration with, or waiver, or any other action ("Consent") by, from or with respect to, any Person is necessary for Seller to execute and deliver this Agreement or to perform his obligations hereunder. SECTION 2.5. PROCEEDINGS. There is no action, suit, claim, investigation, arbitration, hearing or other proceeding (whether civil, criminal, administrative, investigative or informal) ("Proceeding") pending or overtly threatened against the Seller or related to the PowerSecure Shares by, before or involving any court, arbitrator or Governmental Authority which, if determined adversely to Seller, would have a material adverse effect on the ability of Seller to perform his obligations hereunder. 2 SECTION 2.6. STATUS OF POWERSECURE SHARES. (a) Seller is the sole legal, beneficial and record owner of, and has good, valid and marketable title to, all of the PowerSecure Shares owned by Seller, free and clear of any and all restrictions on transfer (other than any restrictions under the Securities Act or applicable state securities laws), mortgages, pledges, security interests, liens, charges, equities, claims, trusts, encumbrances, agreements, rights of first refusal, preemptive rights, limitations on voting rights, sale obligations (such as pursuant to a "co-sale", "take-along," or "bring-along" agreements or the like), or warrants, options or other rights, restrictions or limitations of any kind or nature whatsoever ("Liens"). Upon consummation of the transactions contemplated hereby, Purchaser will acquire good, valid and marketable title to all of the PowerSecure Shares, free and clear of any and all Liens. (b) Seller is not a party to any voting trust, voting agreement, proxy or other agreement or arrangement with respect to the voting, transferability, purchase, sale or redemption of any capital stock of the Company, other than the Shareholders Agreement, dated January 1, 2003, among Purchaser, PowerSecure, Seller and the Other PowerSecure Shareholders (the "Shareholders Agreement"). Except as provided in the Shareholders Agreement, Seller has not granted to any Person any right, right of first refusal, right to purchase, option or similar right with respect to the any of the PowerSecure Shares owned by Seller. SECTION 2.7. SECURITIES REPRESENTATIONS AS TO THE METRETEK SHARES. (A) INVESTMENT INTENT. Seller is acquiring the Metretek Shares solely for his own account, and not as nominee or agent for any other Person, for investment purposes only, and not with a view to any subsequent offering, resale or distribution of the Metretek Shares. (B) SOPHISTICATION AND SUITABILITY. Seller has such knowledge and experience in business and financial matters to be capable of independently evaluating the merits and risks of an investment in the Metretek Shares. Seller has independently evaluated the risks and merits of acquiring the Metretek Shares and has independently determined that the Metretek Shares are a suitable investment for Seller. (C) ACCESS TO INFORMATION. Seller and his representatives have made an independent investigation of Purchaser and its assets, properties, business, liabilities, financial condition, results of operations and prospects. Seller has received or been furnished access to a copy of the Purchaser's Annual Report on Form 10-K for the fiscal year ended December 31, 2003, Quarterly Reports on Form 10-Q for the periods ended March 31, 2004 and June 30, 2004, Current Reports on Form 8-K filed with the Securities and Exchange Commission since December 31, 2003, and Proxy Statement for the annual meeting of stockholders held June 14, 2004. Seller and his representatives (i) have had an opportunity to ask questions of and to receive answers from representatives of Purchaser to their full satisfaction, (ii) have been given access to all of the agreements, instruments, financial statements and other information concerning the business, assets, properties, liabilities, financial condition, results of operations and prospects of Metretek that they have requested, (iii) have had all their questions answered and all information requested provided to 3 the full satisfaction of Seller and his representatives, and (iv) have had access to all of the information they consider necessary or appropriate in order to evaluate the risks and merits of acquiring the Metretek Shares. (D) NO RELIANCE. In making his investment decision, Seller not has relied upon any representations made by Purchaser with respect to Metretek or the Metretek Shares, other than as expressly provided in this Agreement, or upon any projections or other estimates or forecasts of future performance provided by Purchaser. (E) NO REGISTRATION. Seller understands and acknowledges that the Metretek Shares to be acquired by him hereunder have not been registered for offer or sale to Seller under the Securities Act or under the securities laws of any state, but are being offered and sold by Purchaser to Seller pursuant to and in reliance upon exemptions from the registration requirements of such securities laws, and that Purchaser is relying upon the truth and accuracy of the representations, warranties, covenants and agreements of Seller set forth herein in order to determine the availability of such exemptions and the suitability of Seller to acquire the Metretek Shares. (F) RESTRICTIONS ON RESALE. Each Seller understands and acknowledges that, as a consequence of the restrictions on subsequent transfer imposed by the exemptions from registration referred to in Section 2.35(f) above, the Metretek Shares may not subsequently be offered, sold, assigned, conveyed, pledged, hypothecated or otherwise transferred by Seller except pursuant to an effective registration statement registering the sale or transfer of the Metretek Shares under the Securities Act and under applicable state securities laws or pursuant to an exemption from such registration requirements, and the certificates representing the Metretek Shares shall bear a legend setting forth such restrictions substantially as follows: THE SHARES REPRESENTED BY THIS CERTIFICATE HAVE NOT BEEN REGISTERED UNDER THE SECURITIES ACT OF 1933, AS AMENDED, OR THE SECURITIES LAWS OF ANY STATE, AND MAY NOT BE SOLD, ASSIGNED, TRANSFERRED, OR OTHERWISE DISPOSED OF UNLESS THE SAME IS REGISTERED UNDER SUCH ACT AND ANY APPLICABLE STATE SECURITIES LAWS, OR UNLESS AN EXEMPTION FROM SUCH REGISTRATION IS AVAILABLE AND THE COMPANY RECEIVES EVIDENCE OF SUCH EXEMPTION REASONABLY SATISFACTORY TO IT (SUCH AS AN OPINION OF COUNSEL). Each Seller further understands and acknowledges that Purchaser has no obligation, direct or indirect, to register the resale of the Metretek Shares by Seller or any other Person with the Securities and Exchange Commission or with the securities commission or authority of any state or other jurisdiction. (G) CONSULTATION WITH ADVISORS. Seller has had the opportunity to consult with Seller's own legal counsel, accountants, tax advisors and other representatives as Seller has deemed desirable with respect to the transactions contemplated hereby and the suitability of the Metretek Shares for Seller. Seller acknowledges and understands that legal counsel representing Purchaser was not retained to, and does and will not, represent the interests of Seller, and that no legal counsel has 4 been retained by Purchaser or PowerSecure to represent the independent interests of Seller or any other stockholder of PowerSecure. SECTION 3. REPRESENTATIONS AND WARRANTIES OF PURCHASER Purchaser hereby represents and warrants to and for the benefit of seller as follows: SECTION 3.1 ORGANIZATION. Purchaser is a corporation duly incorporated, validly existing and in good standing under the laws of the State of Delaware. SECTION 3.2 POWER AND AUTHORITY. Purchaser has all requisite right, power and authority, corporate or otherwise, to execute, deliver and perform its obligations under this Agreement. The execution and delivery by Purchaser of this Agreement and the performance by Purchaser of its obligations hereunder have been, or on prior to the Closing will be, duly and validly authorized by all requisite action, corporate or otherwise, of Purchaser. SECTION 3.3 ENFORCEABILITY. This Agreement has been duly and validly executed and delivered on behalf of it Purchaser and, subject to approval by the Board of Directors of Purchaser, constitutes a legal, valid and binding obligation of Purchaser, enforceable against it in accordance with its terms, except as such enforcement may be limited by applicable bankruptcy, insolvency, receivership, reorganization, moratorium or other similar laws now or hereafter in effect relating to creditors' rights and remedies generally, and by general principles of equity. SECTION 3.4 NO CONFLICTS. Except for and subject to the receipt of the Consent of the investors in Purchaser's April-May private placement (the "PIPE Investors") and the approval of the Board of Directors of Purchaser, the execution and delivery by Purchaser of this Agreement and the performance by Purchaser of the transactions and obligations contemplated hereby and thereby do not and will not (a) violate, conflict with, contravene or constitute a breach or a default (or an event that, after the giving of notice or the lapse or time or both, would constitute a default) under any provision of (i) Purchaser's Certificate of Incorporation or By-Laws; (ii) any Contract to which it is a party or by which it or any of its assets is bound; or (iii) any license, approval, certificate, permit or authorization held by Purchaser; or (b) violate any applicable federal, state or local law, statute, rule, regulation or ordinance, or any order, injunction, writ, judgment, decree, or ruling of any court, arbitrator or Governmental Authority, except where such violation, conflict, breach or default would not have a material adverse effect upon Purchaser. SECTION 3.5 CONSENTS. Except for the Consent of the PIPE Investors and the approval of the Board of Directors of Purchaser, no Consent by any Person is necessary for Purchaser to execute and deliver this Agreement and to perform its obligations hereunder. SECTION 3.6 NO PROCEEDINGS. There are no Proceedings pending or, to the best of its knowledge, threatened by or before any court, arbitrator or Governmental Authority against it against or affecting it or its assets, (a) in which any Person is seeking to restrain or prohibit, or to obtain 5 damages or other relief in connection with, or to challenge the validity or legality of, this Agreement or the transactions contemplated hereby, or (b) which, if determined adversely to Purchaser, would be reasonably likely to have a material adverse effect on the ability of Purchaser to perform its obligations hereunder or to consummate the transactions contemplated hereby. SECTION 3.7 METRETEK CAPITALIZATION; METRETEK SHARES. (A) CAPITALIZATION OF METRETEK. The authorized capital stock of Metretek consists of 25,000,000 shares of Common Stock, par value $.01 per share, 1,000,000 shares of Series A Preferred Stock, par value $.01 per share, 1,000,000 shares of Series B Preferred Stock, par value $.01 per share, and 500,000 shares of Series C Preferred Stock, par value $.01 per share, of which, as of September 1, 2004, 11,041,701 shares of Common Stock and 4,250 shares of Series B Preferred Stock were issued and outstanding. (B) METRETEK SHARES. The Metretek Shares have been validly authorized and, when issued at the Closing as contemplated by this Agreement, will be validly issued, fully paid and non-assessable. SECTION 3.8 TAX-FREE REORGANIZATION. The issuance of the Metretek Shares to Seller in exchange solely for PowerSecure Shares will qualify as a tax-free reorganization for federal income tax purposes within the meaning of Section 368(a) of the Internal Revenue Code of 1986, as amended, provided Seller takes no action inconsistent with or that would cause such issuance to be disqualified under Section 368(a). SECTION 4. ADDITIONAL COVENANTS SECTION 4.1 CONSUMMATION OF TRANSACTIONS. Upon the terms and subject to the conditions of this Agreement, each of the parties hereto shall use its or his reasonable best efforts, and will cooperate with each other, to take, or cause to be taken, as promptly as practicable, all such actions and to do, or cause to be done, all other things necessary to carry out its or his obligations under this Agreement and under all other agreements contemplated by this Agreement and to consummate and make effective the transactions contemplated hereby and thereby, including obtaining all Consents which are necessary in connection with the transactions contemplated hereby and thereby. SECTION 4.2 PUBLIC ANNOUNCEMENTS. Seller shall not disclose to any Person and shall hold strictly confidential the existence and substance of this Agreement and the transactions contemplated hereby, except for (i) disclosure to advisers and consultants, on a confidential basis, (ii) as required to be disclosed pursuant to any law, rule or regulation, including income tax reporting, or (iii) to the extent previously disclosed by Purchaser in any filing with the Securities and Exchange Commission or in any press release. SECTION 4.3 OWNERSHIP OF POWERSECURE SHARES. Seller hereby covenants and agrees that, from the date hereof until the Closing or the earlier termination of this Agreement in accordance with the terms hereof, he shall not, and shall not offer or agree to, sell, transfer, tender, 6 assign, hypothecate or otherwise dispose of, or create or permit to exist any encumbrance on, or grant any proxy with respect to, any of the PowerSecure Shares, and any attempt by Seller to do the same shall be void ab initio. SECTION 5. CONDITIONS PRECEDENT TO PURCHASER'S CLOSING OBLIGATIONS The obligations of Purchaser to purchase the PowerSecure Shares and to issue the Metretek Shares, and to take the other actions contemplated hereby to be taken by Purchaser at or prior to the Closing, are subject to the satisfaction (unless waived in writing by Purchaser), at or prior to the Closing, of each of the following conditions: SECTION 5.1 ACCURACY OF REPRESENTATIONS AND WARRANTIES. Each and every representation and warranty made by Seller in this Agreement shall be true and correct in all material respects as of the date of this Agreement and as of the Closing Date as if made on the Closing Date. SECTION 5.2 PERFORMANCE OF COVENANTS. Seller shall have performed, satisfied and complied in all material respects with all covenants, agreements, obligations and conditions under this Agreement which are to be performed, satisfied or complied with by Seller at or prior to the Closing. SECTION 5.3 PROCEEDINGS AND DOCUMENTS SATISFACTORY. All proceedings, corporate or otherwise, to be taken by Seller or Purchaser in connection with the transactions contemplated hereby, and all documents incident thereto, shall be reasonably satisfactory in form and substance to Purchaser and its counsel. SECTION 5.4 NO PROCEEDINGS. No Proceeding shall be pending or overtly threatened by or before any court, arbitrator or Governmental Authority (a) against or affecting Seller that directly or indirectly affects or involves the ability of Seller to perform his obligations hereunder, including but not limited to the sale and transfer of his PowerSecure Shares to Purchaser, or (b) which seeks the restraint, prohibition or obtaining of damages or other relief in connection with, or which questions or challenges the legality, validity or enforceability of this Agreement, or which may have the effect of preventing, delaying, or otherwise interfering with the consummation of the transactions contemplated hereby. SECTION 5.5 NO CLAIMS FOR POWERSECURE SHARES. No Person (other than Seller and the Other PowerSecure Shareholders) shall have made or overtly threatened to make any claim that such Person (a) is the holder or the beneficial owner of, or has the right to acquire or to obtain beneficial ownership of, any of the shares or any other capital stock or any voting, equity or ownership interest in, or any other security of, or any option, warrant or right to acquire any securities of, PowerSecure, or (b) is entitled to all or any portion of the Metretek Shares to be issued hereunder. SECTION 5.6 DELIVERIES AT CLOSING. Seller shall have delivered to Purchaser at the Closing the PowerSecure Shares and each of the certificates, instruments, documents and agreements required to be delivered to Purchaser hereunder. 7 SECTION 5.7 CONSENTS. Any and all Consents necessary to permit the consummation of the transactions contemplated hereby shall have been duly obtained. SECTION 5.8 PURCHASER BOARD APPROVAL. The Board of Directors of Purchaser shall have approved and authorized this Agreement and the transactions contemplated hereby, including the issuance of the Metretek Shares to Seller. SECTION 5.9 PIPE INVESTOR APPROVAL. The PIPE Investors shall have approved and consented to, or waived their right to approve and consent to, this Agreement and the transactions contemplated hereby, including the issuance of the Metretek Shares to Seller, or due to the passage of time their approval and consent shall no longer be required. SECTION 5.10. SECURITIES LAWS. All pre-issuance registrations, qualifications, notifications, permits and approvals, if any, required under applicable state securities laws for the lawful execution, delivery and performance of this Agreement and the offer, sale, and delivery of the Metretek Shares to Seller shall have been obtained prior to the Closing and in full force and effect on the Closing Date. SECTION 5.11 FAIRNESS OPINION. Purchaser shall have received an opinion, in form and substance satisfactory to Purchaser in its sole discretion, from an investment banking firm selected by Purchaser that the sale and issuance of the Metretek Shares hereunder by Purchaser to Seller in exchange and consideration for the sale and transfer of the PowerSecure Shares by Seller to Purchaser is fair, from a financial point of view, to Purchaser. SECTION 5.12 CLOSING WITH OTHER POWERSECURE SHAREHOLDERS. Purchaser shall have consummated the purchase, prior to or contemporaneously with the Closing contemplated by this Agreement, of all other PowerSecure Shares owned by the Other PowerSecure Shareholders. SECTION 6. CONDITIONS PRECEDENT TO SELLER'S OBLIGATIONS The obligations of Seller to sell and deliver the PowerSecure Shares to Purchaser and to perform his other obligations contemplated hereby to be taken at or prior to the Closing are subject to the satisfaction (unless waived in writing by Seller), at or prior to the Closing, of each of the following conditions: SECTION 6.1 ACCURACY OF REPRESENTATIONS AND WARRANTIES. Each of the representations and warranties made by Purchaser in this Agreement shall be true and correct in all material respects as of the date of this Agreement and as of the Closing Date as if made on the Closing Date. SECTION 6.2 PERFORMANCE OF COVENANTS. Purchaser shall have performed, satisfied and complied in all material respects with all of the covenants, agreements, obligations and conditions under this Agreement which are to be performed, satisfied or complied with by Purchaser at or prior to the Closing. SECTION 6.3 NO PROCEEDINGS. No Proceeding shall be pending or overtly threatened before any court, arbitrator or Governmental Agency which seeks the restraint, prohibition or the obtaining of 8 damages or other relief in connection with this Agreement or the consummation of the transactions contemplated hereby. SECTION 6.4 DELIVERIES AT CLOSING. Purchaser shall have delivered to Seller at the Closing the Metretek Shares and each of the other certificates, instruments, documents and agreements required to be delivered to Seller hereunder. SECTION 6.5 PURCHASER BOARD APPROVAL. The Board of Directors of Purchaser shall have approved and authorized this Agreement and the transactions contemplated hereby, including the issuance of the Metretek Shares to Seller. SECTION 6.6 PIPE INVESTOR APPROVAL. The PIPE Investors shall have approved and consented to, or waived their right to approve and consent to, this Agreement and the transactions contemplated hereby, including the issuance of the Metretek Shares to Seller, or due to the passage of time their approval and consent shall no longer be required. SECTION 7. THE CLOSING SECTION 7.1 DATE AND PLACE. The consummation of the sale and transfer of the PowerSecure Shares by Seller to Purchaser in exchange for the sale and issuance of the Metretek Shares by Purchaser to Seller contemplated hereby (the "Closing") shall take place at the principal executive offices of Purchaser, 303 East Seventeenth Avenue, Suite 660, Denver, Colorado, 80203, within five (5) business days after all conditions have been met, or at such other time, date or place as the parties shall mutually agree (the actual date of the Closing is referred to herein as the "Closing Date"). SECTION 7.2 DELIVERIES BY SELLER. At the Closing, Seller shall deliver or cause to be delivered to Purchaser, in form reasonably acceptable to Purchaser: (a) The certificate or certificates representing all the PowerSecure Shares to be purchased by Purchaser hereunder, duly endorsed by Seller in blank for transfer to Purchaser or accompanied by stock powers duly endorsed by Seller in blank for transfer to Purchaser; and (b) All other items documents, instruments and certificates required to be delivered by Seller pursuant to any provision of this Agreement or reasonably requested by Purchaser. SECTION 7.3 DELIVERIES BY PURCHASER. At the Closing, Purchaser shall deliver or cause to be delivered to Seller, in form reasonably acceptable to Seller: (a) One or more certificates representing the Metretek Shares to be issued to Seller hereunder, duly registered on the stock transfer books of Purchaser in the name of Seller; and (b) All other items documents, instruments and certificates required to be delivered by Purchaser pursuant to any provision of this Agreement or reasonably requested by Seller. 9 SECTION 7.4 EFFECTIVENESS OF CLOSING. No action to be taken or delivery to be made at the Closing shall be effective until all of the actions to be taken and deliveries to be made at the Closing are complete. SECTION 8. SURVIVAL AND INDEMNIFICATION SECTION 8.1 SURVIVAL. The representations and warranties set forth in this Agreement shall survive the Closing and shall continue in full force and effect thereafter, regardless of any investigation made by any party hereto, for a period of three (3) years after the Closing Date, except that any Claims (as defined in Section 8.4) (i) by Purchaser against Seller for breach of a representation or warranty set forth in Sections 2.6, or claims relating to fraud, shall expire only upon the expiration of the applicable statute of limitations; or (ii) that arose prior to the expiration of such survival period where proper notice thereof is given pursuant to Section 8.4 prior to the expiration of such survival period shall not expire until fully and finally resolved. All covenants and agreements set forth in this Agreement shall survive the Closing. SECTION 8.2 INDEMNIFICATION BY SELLER. Seller shall indemnify, defend and hold harmless Purchaser, its affiliates, successors and assigns, and the officers, directors, shareholders, partners, employees, agents and representatives of any of them, from and against any and all claims, actions, suits, proceedings demands, losses (including diminutions in value), expenses, obligations, taxes, liabilities, damages, recoveries and deficiencies (including, without limitation, interest, fines, penalties, costs of investigation, reasonable attorneys', accountants' and other professionals' fees and expenses and amounts paid in settlement) (collectively, "Damages") arising out of, based upon or resulting from (a) any breach or violation of, inaccuracy or misrepresentation in, or failure by Seller to perform, any representations, warranties, covenants, agreements or other obligations of the Company made in this Agreement or in any schedule, certificate, exhibit or other document or instrument furnished or to be furnished by Seller to Purchaser pursuant to this Agreement; or (b) any claim by any Person to (i) own, or to have the right to own or acquire, any PowerSecure Shares ever issued to Seller, or (ii) all or any portion of the Metretek Shares issuable to Seller in consideration for the PowerSecure Shares owned by Seller. SECTION 8.3 INDEMNIFICATION BY PURCHASER. Purchaser shall indemnify, defend and hold harmless Seller and his affiliates, successors and assigns, and the officers, directors, shareholders, partners, employees, agents and representatives of any of them, from and against any and all Damages arising out of, based upon or resulting from any breach or violation of, inaccuracy or misrepresentation in, or failure by Purchaser to perform, any of the representations, warranties, covenants, agreements or other obligations of the Purchaser made in this Agreement. SECTION 8.4 CLAIMS FOR INDEMNIFICATION (a) Whenever any party hereunder believes it has suffered or incurred or is likely to suffer or incur any Damages, or any action or proceeding is commenced or threatened or claim is made that could result in Damages, which is reasonably likely to give rise to a claim ("Claim") for indemnification under this Agreement, the party seeking indemnification ("Indemnified Party") shall, upon obtaining knowledge thereof, promptly notify in writing the party against whom indemnification 10 is sought ("Indemnifying Party") of the Claim and, when known, the facts constituting the basis for such Claim and the amount and nature of the Damages or an estimate thereof. The Indemnified Party's failure to timely notify Indemnifying Party of any Claim or potential Claim shall not relieve the Indemnifying Party of any liability hereunder unless and only to the extent that such failure causes Indemnifying Party to lose the right to assert any substantive rights or defenses or to the extent that the Indemnifying Party is actually prejudiced in its rights or obligations. (b) The Indemnified Party shall give the Indemnifying Party a reasonable opportunity to participate in and to assume the defense of any such Claim at the Indemnifying Party's own expense and with counsel of the Indemnifying Party's own selection reasonably satisfactory to the Indemnified Party provided, however, that Indemnified Party shall at all times also have the right but not the obligation, to fully participate in the defense of the Claim and to employ its own counsel at its own expense. Notwithstanding the foregoing, if the Indemnified Party reasonably determines that: (i) legal defenses may be available to the Indemnified Party that are different from or in addition to those available to the Indemnifying Party, (ii) a conflict or potential conflict of interest exists between the Indemnified Party and the Indemnifying Party (in which case the Indemnifying Party shall not have the right to direct the defense of such Claim on behalf of the Indemnified Party), or (iii) the Indemnifying Party has not in fact employed legal counsel to assume the defense of such Claim within a reasonable time after receiving notice of the Claim, then the reasonable fees, disbursements and other charges of counsel from one separate firm selected by the Indemnified Party (and reasonably acceptable to the Indemnified Party) shall be reimbursed by the Indemnified Party promptly as they are incurred. (c) No party hereto shall compromise, settle or consent to the entry of any judgment with respect to any Claim without the prior written consent of the other interested party or parties (which consent shall not be unreasonably withheld or delayed) unless such compromise, settlement or consent includes an unconditional release of all other interested parties hereto from any and all liabilities on any Claims that are the subject matter thereof. (d) Each party hereto shall cooperate in every reasonable way with the party assuming responsibility for the defense and disposition of any such Claim, including making available to the defending party all books, records, and other material reasonably required by the defending party for its use in defending the Claim. SECTION 8.5 NON-EXCLUSIVE INDEMNIFICATION. The foregoing indemnification provisions are in addition to, and not in derogation of, or statutory, equitable or common law remedies any party hereto may have for any breach of representation, warranty, covenant or agreement. SECTION 8.6. EFFECT OF KNOWLEDGE. No disclosure to nor investigation by or on behalf of any party hereto shall be deemed to affect its reliance on the representations, warranties, covenants and agreements contained herein or to waive its rights to indemnification as provided herein for the breach or violation of or inaccuracy or failure to perform or comply with any representation, warranty, covenant or agreement of any other party hereto. SECTION 8.7. CONTRIBUTION. If the indemnification provided for in this Section 8 is for any reason unavailable or insufficient to indemnify the Indemnified Party in respect of any Damages, 11 then the Indemnifying Party shall in lieu of indemnifying the Indemnified Party contribute to the total damages to which the Indemnified Party may be subject in such proportion that shall be appropriate to reflect the relative fault of the Indemnifying Party, on the one hand, and the Indemnified Party, on the other hand, in connection with any actions or omissions which resulted in such Damages as well as any other relevant equitable considerations. SECTION 9. TERMINATION AND CONFIDENTIALITY SECTION 9.1 EVENTS OF TERMINATION. This Agreement may be terminated at any time prior to the Closing as follows: (a) By mutual written agreement of Seller and Purchaser; (b) By either Seller or by Purchaser, by giving written notice of the other, if there has been a material breach of any representation, warranty, covenant or agreement on the part of the other party that continues unremedied for a period of at least fifteen (15) days after such notice; (c) By either Seller or by Purchaser, by giving written notice to the other if the Closing Date has not occurred on or before December 31, 2004, unless such party's intentional failure to fulfill any obligation hereunder has been the cause of, or has resulted in, the failure of the Closing to occur on or before such date; or (d) By either Seller or Purchaser by giving written notice to the other if any court, arbitrator or Governmental Authority of competent jurisdiction shall have issued an order, judgment, decree, ruling or taken other action restraining, enjoining or otherwise prohibiting the transaction contemplated hereby. SECTION 9.2 EFFECT OF TERMINATION. If any party terminates this Agreement in accordance with Section 10.1, then all rights and obligations of the parties shall cease, except for the obligations set forth in Sections 4.2, 8, 9 and 10 which shall survive such termination; provided, however, that any termination of this Agreement shall not affect the rights of either Seller or Purchaser against the other for breach of any representation, warranty, covenant or agreement set forth in this Agreement. SECTION 9.3 CONFIDENTIALITY. Notwithstanding the provisions of this Section 9, if for any reason the transactions contemplated by this Agreement are not consummated, each of the parties hereto shall keep confidential any information obtained from any other party (except information publicly available or in such party's domain prior to the date hereof, and except as required by court order) and shall promptly return to the other parties all schedules, documents, instruments, work papers or other written information, without retaining copies thereof, previously furnished by it as a result of this Agreement or in connection herewith. SECTION 10. GENERAL PROVISIONS SECTION 10.1 GOVERNING LAW. This Agreement shall in all respects be governed by and construed and enforced in accordance with the internal substantive laws of the State of Delaware without giving effect to any principle or rule of conflict or choice of laws. Any action, suit or other 12 proceeding seeking to enforce any right, remedy, obligation, duty, covenant or provision of, or arising out of, this Agreement shall be brought and entered against any party hereto exclusively in any court of the State of Colorado or of the United States located in the State of Colorado. All parties hereto irrevocably submits to the personal jurisdiction of any such court and irrevocably waives, to the fullest extent of the law, any objection that it may now or hereafter have to the laying of venue in any such court and any claim that such action, suit or proceeding has been brought in an inconvenient forum. SECTION 10.2 EXPENSES. Each of the parties to this Agreement agrees to pay its own costs and expenses incurred in connection with this Agreement and the transactions contemplated hereby, including the fees and expenses of its counsel, accountant and other advisers and agents, except as provided in the following sentence. Seller shall solely be responsible for the fees and expenses of his own legal counsel, which shall not become an obligation of the Company. SECTION 10.3 ASSIGNMENT. Neither this Agreement nor any of the rights or obligations hereunder may be assigned by any party hereto without the prior written consent of all other parties hereto. SECTION 10.4 SUCCESSORS AND ASSIGNS. This Agreement shall be binding upon and inure to the benefit of the parties hereto and their respective successors and permitted assigns. SECTION 10.5 AMENDMENTS. This Agreement may not be amended or modified in any manner in whole or in part except by a writing signed by Purchaser and Seller that specifically states that it amends this Agreement. SECTION 10.6 NOTICES. Any and all notices, demands, requests, elections and other communications required or permitted to be given hereunder shall be in writing and shall be deemed to have been duly given to a party (i) when delivered to such party in person; (ii) upon receipt of confirmation of transmission when sent by facsimile transmission or electronic mail; (iii) one business day after deposit during normal business hours with a nationally recognized overnight courier service, specifying next business day delivery, with written verification of receipt; or (iv) five business days after being sent by first class (certified or registered) mail, postage prepaid, return receipt requested, in each case to such party at the following addresses: If to Purchaser: --------------- Metretek Technologies, Inc. 303 East Seventeen Ave., Suite 660 Denver, Colorado 80203 Attn: W. Phillip Marcum, President Telephone: (303) 785-8080 Facsimile: (303) 785-8085 13 With copies to: Kegler, Brown, Hill & Ritter Co., L.P.A. 65 East State Street, Suite 1800 Columbus, Ohio 43215 Attn: Paul R. Hess, Esq. Telephone: (614) 462-5400 Facsimile: (614) 464-2634 If to Seller: ------------ To Seller at the address specified on the Signature Page under "Notice Information." Any party may change its or his designated address by giving written notice thereof to all other parties hereto in the manner provided in this Section 10.6. Any party hereto may send any notice, request, demand, or other communication to the intended recipient at the address above by using any other means, but no such notice, demand, request or other communication shall be deemed to have been given until it is actually received by the recipient. SECTION 10.7 WAIVER. The obligations of any party hereunder may be waived only with the written consent of the party or parties entitled to the benefits the obligations so involved. Any waiver of a breach or violation of or default under any provision of this Agreement shall not be construed or operate as, or constitute, a waiver of any other or subsequent breach or violation of or default under that provision or any other provision of this Agreement. The failure of any party to insist upon strict compliance with any provision of this Agreement on any one or more occasions shall not be construed or operate as, or constitute, a continuing waiver of, or an estoppel of that party's right to insist upon strict compliance with, that provision or any other provision of this Agreement. SECTION 10.8 SEVERABILITY. The provisions of this Agreement shall be deemed severable. If any provision of this Agreement is determined to be illegal, invalid or unenforceable in any situation: (i) the parties hereto shall agree to a suitable and equitable provision to be substituted therefor in order to carry out, so far as may be valid and enforceable, the intent and purpose of such invalid or unenforceable provision; and (ii) the remainder of this Agreement shall remain in full force and effect, and the application of such provision in any other situation shall not be affected. SECTION 10.9 HEADINGS. The headings used in this Agreement are solely for convenience of reference and shall be given no effect in the construction or interpretation of this Agreement. SECTION 10.10 NO THIRD PARTY BENEFICIARIES. Except as expressly provided in this Agreement, this Agreement does not confer or create, is not intended by the parties hereto to confer or create, and shall not be construed to as conferring or creating, upon any person or entity other than the parties hereto and their successors and permitted assigns any rights, remedies or causes of action under or by reason of this Agreement. 14 SECTION 10.11. CONSTRUCTION. All parties to this Agreement participated in the negotiation and drafting of this Agreement. In the event an ambiguity or question or intent or interpretation arises, this Agreement shall be construed as if drafted jointly by the parties hereto and no presumption or burden of proof shall arise favoring or disfavoring any party hereto by virtue of the authorship of any of the provisions of this Agreement. SECTION 10.12 SCHEDULE. The Schedule attached to this Agreement is incorporated into and made a part of this Agreement as if it were fully set forth herein. SECTION 10.13 INTERPRETATION OF CERTAIN PROVISIONS. Except as otherwise expressly provided herein, as used in this Agreement: (i) Any reference to any federal, state, local or foreign statute or law shall be deemed also to include a reference to all rules and regulations promulgated thereunder. (ii) The term "including" means "including, without limitation". (iii) The term "Entity" means any corporation, partnership, limited liability company, joint venture, association, trust, unincorporated organization, estate, or any other form of business or entity. (iv) The term "Governmental Authority" means any federal, state, local or foreign government, quasi-governmental administration or regulatory body, agency or authority. (v) The term "Person" means and includes any individual, Entity or Governmental Authority. (vi) The number and gender of each noun and pronoun and the terms "Person" and "Persons" and the like shall be construed to mean such number and gender as the context, the circumstances or its antecedent may require. (vii) The terms "hereof", "herein", "hereunder" and words of similar import refer to this Agreement as a whole, and not to any Section, subsection or clause of this Agreement. (viii) Each reference to a Section means such Section of this Agreement. (ix) Each reference to a Schedule means such Schedule to this Agreement. SECTION 10.14 SPECIFIC PERFORMANCE; CUMULATIVE REMEDIES. The parties hereto acknowledge and agree that the transactions contemplated by this Agreement are unique in that remedies at law for any breach or threatened breach of this Agreement would be an inadequate remedy for any loss, and that any defense in any action for specific performance that a remedy at law would be adequate is hereby specifically waived. Accordingly, in the event of any actual or 15 threatened breach to any of the terms of this Agreement, the non-breaching party shall have the right of specific performance and injunctive relief giving effect to its rights under this Agreement, in addition to any and all other rights and remedies, at law or in equity, and all such rights and remedies are cumulative. SECTION 10.15 COUNTERPARTS. This Agreement may be executed in any number of counterparts, including counterparts executed by less than all parties hereto, each of which shall be deemed an original, but all of which together shall constitute one and the same instrument. SECTION 10.16 ENTIRE AGREEMENT. This Agreement constitutes the entire agreement and understanding between the parties hereto with respect to the subject matter hereof and supersedes all prior and contemporaneous arrangements, agreements and understandings, whether oral or written, among the parties hereto in connection with the subject matter of this Agreement. (The next page is the Signature Page) 16 SIGNATURE PAGE FOR PURCHASER IN WITNESS WHEREOF, this Stock Purchase Agreement has been executed and delivered by or on behalf of the parties hereto as of the date first above written. PURCHASER: METRETEK TECHNOLOGIES, INC. By: ------------------------------------- Its: ------------------------------------ 17 SIGNATURE PAGE FOR SELLER IN WITNESS WHEREOF, this Stock Purchase Agreement has been executed and delivered by or on behalf of the parties hereto as of the date first above written. SELLER: ---------------------------------------- Signature ---------------------------------------- Print Name NOTICE INFORMATION FOR SELLER: ---------------------------------------- Address ---------------------------------------- City, State and Zip Code ---------------------------------------- Telephone Number ---------------------------------------- Facsimile Number 18 SCHEDULE I SELLER, POWERSECURE SHARE HOLDINGS AND METRETEK SHARES TO BE RECEIVED Name of Seller: ----------------------------- PowerSecure Shares Held: -------------------- Metretek Shares to be Received: ------------- 19