EXHIBIT 4(b) TO FORM 10-Q, 1ST QUARTER 1998 GUARANTY GUARANTY, dated as of March 31, 1998, by BANGOR HYDRO - ELECTRIC COMPANY, a Maine corporation (the "Guarantor") in favor of (a) BANKBOSTON, N.A., a national banking association, as agent (hereinafter, in such capacity, the "Agent") for itself and the other lending institutions (hereinafter, collectively, the "Banks") which are or may become parties to a Term Loan Agreement, dated as of March 31, 1998 (as amended and in effect from time to time, the "Loan Agreement"), among BANGOR ENERGY RESALE, INC., a Maine corporation (the "Company"), the Banks and the Agent and (b) each of the Banks. WHEREAS, the Guarantor is the holder of one hundred percent (100%) of the issued and outstanding capital stock of the Company; WHEREAS, the Guarantor expects to receive substantial direct and indirect benefits from the extensions of credit to the Company by the Banks pursuant to the Loan Agreement (which benefits are hereby acknowledged); WHEREAS, it is a condition precedent to the Banks' making any loans or otherwise extending credit to the Company under the Loan Agreement that the Guarantor execute and deliver to the Agent, for the benefit of the Banks and the Agent, a guaranty substantially in the form hereof; and WHEREAS, the Guarantor wishes to guaranty the Company's obligations to the Banks and the Agent under or in respect of the Loan Agreement as provided herein; NOW, THEREFORE, in consideration of the foregoing premises and other good and valuable consideration, the receipt and sufficiency of which is hereby acknowledged, the Guarantor hereby agrees with the Banks and the Agent as follows: 1. DEFINITIONS. The term "Obligations" and all other capitalized terms used herein and not otherwise defined herein shall have the respective meanings provided therefor in the Loan Agreement. 2. GUARANTY OF PAYMENT AND PERFORMANCE. The Guarantor hereby guarantees to the Banks and the Agent the full and punctual payment when due (whether at stated maturity, by required pre- payment, by acceleration or otherwise), as well as the performance, of all of the Obligations including all such which would become due but for the operation of the automatic stay pursuant to Section 362(a) of the Federal Bankruptcy Code and the operation of Section Section 502(b) and 506(b) of the Federal Bankruptcy Code. This Guaranty is an absolute, unconditional and continuing guaranty of the full and punctual payment and performance of all of the Obligations and not of their collectibility only and is in no way conditioned upon any requirement that the Agent or any Bank first attempt to collect any of the Obligations from the Company or resort to any collateral security or other means of obtaining payment. Should the Company default in the payment or performance of any of the Obligations, the obligations of the Guarantor hereunder with respect to such Obligations in default shall, upon demand by the Agent, become immediately due and payable to the Agent, for the benefit of the Banks and the Agent, without demand or notice of any nature, all of which are expressly waived by the Guarantor. Payments by the Guarantor hereunder may be required by the Agent on any number of occasions. All payments by the Guarantor hereunder shall be made to the Agent, in the manner and at the place of payment specified therefor in the Loan Agreement, for the account of the Banks and the Agent and shall be made without setoff or counterclaim and free and clear of and without deduction for any income, stamp or other taxes, levies, imposts, duties, charges, fees, deductions, withholdings, now or hereinafter imposed, levied or collected, withheld or assessed by any governmental authority, agency or instrumentality excluding, in the case of the Agent and each Bank, net income and franchise taxes imposed on the Agent or such Bank by the jurisdiction under the laws of which such Agent or such Bank is organized or any political subdivision thereof or taxing or other authority therein unless the Guarantor is compelled by law to make such deduction or withholding. Notwithstanding anything to the contrary in this Guaranty, the Guarantor's liability hereunder shall be limited to an amount equal to $24,800,000, plus, without limitation as to the amounts thereof, all interest (but only to the extent such interest accrues at the rates (including default rates) expressly contemplated by the Credit Agreement as in effect on the date hereof), banking charges, commissions, costs and reasonable expenses chargeable to the Company in respect of the Obligations (but only to the extent such Obligations are expressly provided for in the Credit Agreement as in effect on the date hereof), plus all interest and other costs and expenses payable by such Guarantor pursuant to Section 3 hereof. The Agent's and the Bank's dealings with the Company need not be limited to any particular sum notwithstanding any limitation herein upon the liability of the Guarantor. 3. GUARANTOR'S AGREEMENT TO PAY ENFORCEMENT COSTS, ETC. The Guarantor further agrees, as the principal obligor and not as a guarantor only, to pay to the Agent, on demand, all reasonable out-of-pocket fees, expenses and disbursements of the Agent (including court costs and reasonable legal expenses) incurred or expended in connection with the preparation, administration or interpretation of this Guaranty and the enforcement thereof. Notwithstanding the foregoing, the Guarantor shall have no obligation hereunder to the Agent with respect to any such costs or expenses arising from the gross negligence or willful misconduct of the Agent. 4. WAIVERS BY GUARANTOR; BANK'S FREEDOM TO ACT. The Guarantor agrees that the Obligations will be paid and performed strictly in accordance with their respective terms, regardless of any law, regulation or order now or hereafter in effect in any jurisdiction affecting any of such terms or the rights of the Agent or any Bank with respect thereto. The Guarantor waives promptness, diligence, presentment, demand, protest, notice of acceptance, notice of any Obligations incurred and all other notices of any kind, all defenses which may be available by virtue of any valuation, stay, moratorium law or other similar law now or hereafter in effect, any right to require the marshalling of assets of the Company or any other entity or other person primarily or secondarily liable with respect to any of the Obligations, all suretyship defenses generally, and any defense based upon any requirement of law which provides that the obligation of a surety must be neither larger in amount nor in other respects more burdensome than that of the principal. Without limiting the generality of the foregoing, the Guarantor agrees to the provisions of any instrument evidencing, securing or otherwise executed in connection with any Obligation and agrees that the obligations of the Guarantor hereunder shall not be released or discharged, in whole or in part, or otherwise affected by (a) the failure of the Agent or any Bank to assert any claim or demand or to enforce any right or remedy against the Company or any other entity or other person primarily or secondarily liable with respect to any of the Obligations; (b) any extensions, compromise, refinancing, consolidation or renewals of any Obligation; (c) any change in the time, place or manner of payment of any of the Obligations or any rescissions, waivers, compromise, refinancing, consolidation or other amendments or modifications of any of the terms or provisions of the Loan Agreement, the Term Note, the other Loan Documents or any other agreement evidencing or otherwise executed in connection with any of the Obligations, (d) the addition, substitution or release of any entity or other person primarily or secondarily liable for any Obligation; or (e) the adequacy of any rights which the Agent or any Bank may have against any collateral security or other means of obtaining repayment of any of the Obligations; (f) the impairment of any collateral securing any of the Obligations, including without limitation the failure to perfect or preserve any rights which the Agent or any Bank might have in such collateral Security or the Substitution, exchange, surrender, release, loss or destruction of any such collateral security; or (g) any other act or omission which might in any manner or to any extent vary the risk of the Guarantor or otherwise operate as a release or discharge of the Guarantor, all of which may be done without notice to the Guarantor. To the fullest extent permitted by law, the Guarantor hereby expressly waives any and all rights or defenses arising by reason of (i) any "one action" or "anti-deficiency" law which would otherwise prevent the Agent or any Bank from bringing any action, including any claim for a deficiency, or exercising any other right or remedy (including any right of set-off), against the Guarantor before or after the Agent's or such Bank's commencement or completion of any foreclosure action, whether judicially, by exercise of power of sale or otherwise, or (ii) any other law which in any other way would otherwise require any election of remedies by the Agent or any Bank. 5. UNENFORCEABILITY OF OBLIGATIONS AGAINST COMPANY. If for any reason the Company has no legal existence or is under no legal obligation to discharge any of the Obligations, or if any of the Obligations have become irrecoverable from the Company by reason of the Company's insolvency, bankruptcy or reorganization or by other operation of law or for any other reason, this Guaranty shall nevertheless be binding on the Guarantor to the same extent as if the Guarantor at all times had been the principal obligor on all such Obligations. In the event that acceleration of the time for payment of any of the Obligations is stayed upon the insolvency, bankruptcy or reorganization of the Company, or for any other reason, all such amounts otherwise subject to acceleration under the terms of the Loan Agreement, the Term Notes, the other Loan Documents or any other agreement evidencing, securing or otherwise executed in connection with any Obligation shall be immediately due and payable by the Guarantor. 6. SUBROGATION; SUBORDINATION. 6.1 WAIVER OF RIGHTS AGAINST COMPANY. The Guarantor shall not exercise and hereby waives any rights against the Company arising as a result of payment by the Guarantor hereunder, by way of subrogation, reimbursement, restitution, contribution or otherwise, and will not prove any claim in competition with the Agent or any Bank in respect of any payment hereunder in any bankruptcy, insolvency or reorganization case or proceedings of any nature; the Guarantor will not claim any setoff, recoupment or counterclaim against the Company in respect of any liability of the Guarantor to the Company; and the Guarantor waives any benefit of and any right to participate in any collateral security which may be held by the Agent or any Bank. 6.2 SUBORDINATION. The payment of any amounts due with respect to any indebtedness of the Company for money borrowed or credit received now or hereafter owed to the Guarantor is hereby subordinated to the prior payment in full of all of the Obligations. The Guarantor agrees that, after the occurrence of any default in the payment or performance of any of the Obligations, the Guarantor will not demand, sue for or otherwise attempt to collect any such indebtedness of the Company to the Guarantor until all of the Obligations shall have been paid in full. If, notwithstanding the foregoing sentence, the Guarantor shall collect, enforce or receive any amounts in respect of such indebtedness while any Obligations are still outstanding, such amounts shall be collected, enforced and received by the Guarantor as trustee for the Banks and the Agent and be paid over to the Agent, for the benefit of the Banks and the Agent, on account of the Obligations without affecting in any manner the liability of the Guarantor under the other provisions of this Guaranty. 7. SECURITY; SETOFF. Regardless of the adequacy of any collateral security or other means of obtaining payment of any of the Obligations, during the continuance of any Event of Default, any deposits or other sums credited by or due from any of the Banks to the Guarantor and any securities or other property of the Guarantor in the possession of such Bank may be applied to or set off by such Bank against the payment of Obligations then due and payable hereunder. Such Agent or Bank shall notify Bangor promptly after exercising any right of setoff. 8. REPRESENTATIONS AND WARRANTIES. The Guarantor hereby repeats to each of the Banks and the Agent each of the representations and warranties made in Section Section 5.1, 5.8, 5.9, 5.16 and 5.21 of the Loan Agreement and hereby repeats to each of the Banks and the Agent each of the representations and warranties made in Section 5.6 of the Chase Credit Agreement, with such representations and warranties being incorporated herein as if such representations and warranties were set forth verbatim herein provided, however, that the provisions of such sections shall apply mutatis mutandis to the Guarantor so that such representations and warranties would apply to the Guarantor instead of the Borrower. Such representations and warranties shall survive termination, cancellation, amendment and recission of the Loan Agreement and shall not be affected by any termination, cancellation, amendment or recission of the Loan Agreement. 9. COVENANTS; FURTHER ASSURANCES. The Guarantor hereby agrees that (a) it will not make any changes, amendments or modifications whatsoever to the Rate Schedule Agreement or the Service Agreement or otherwise assign its rights thereunder, without the prior written consent of the Agent; (b) the Guarantor will at all times, at the reasonable request of the Agent, cooperate with the Agent in exercising the Agent's rights under the Security Documents so that the Agent is entitled to all its rights under the Security Documents; and (c) if after an Event of Default the Agent or any assignee of the Unitil Contract requests the Guarantor to do so, in connection with any future assignment of the Unitil Contract, the Guarantor will remain obligated to perform under the Service Agreement (including the Rate Schedule or the Substitute Rate Schedule (as defined in the Service Agreement), as applicable, in accordance with the terms of the Service Agreement) or any subsequent agreement required by FERC in order to effectuate or carry out the purpose and intent of the Service Agreement. 10. The Guarantor agrees that it will from time to time, at the request of the Agent, do all such things and execute all such documents as the Agent may consider reasonably necessary or desirable to give full effect to this Guaranty and to perfect and preserve the rights and powers of the Banks and the Agent hereunder. The Guarantor acknowledges and confirms that the Guarantor itself has established its own adequate means of obtaining from the Company on a continuing basis all information desired by the Guarantor concerning the financial condition of the Company and that the Guarantor will look to the Company and not to the Agent or any Bank in order for the Guarantor to keep adequately informed of changes in the Company's financial condition. 11. TERMINATION; REINSTATEMENT. This Guaranty shall remain in full force and effect until the Obligations have been undefeasibly repaid in full in cash, provided, however, notwithstanding the foregoing, the covenant of the Guarantor in Section 9(c) shall remain in full force and effect until the earlier to occur of (a) the Guarantor having received written notice from the Agent of the Agent's election to release the Guarantor from such provision; and (b) the date on which all obligations under the Unitil Contract have been fully performed by all parties thereto and all payments contemplated to be made thereunder have been made. No such notice shall be effective unless received and acknowledged by an officer of the Agent at the address of the Agent set forth below. No such notice shall affect any rights of the Agent or any Bank hereunder, including without limitation the rights set forth in Section 4 and Section 6, with respect to any Obligations incurred or accrued prior to the receipt of such notice or any Obligations incurred or accrued pursuant to any contract or commitment in existence prior to such receipt. This Guaranty shall continue to be effective or be reinstated, notwithstanding any such notice, if at any time any payment made or value received with respect to any Obligation is rescinded or must otherwise be returned by the Agent or any Bank upon the insolvency, bankruptcy or reorganization of the Company, or otherwise, all as though such payment had not been made or value received. 11. SUCCESSORS AND ASSIGNS. This Guaranty shall be binding upon the Guarantor, its successors and assigns, and shall inure to the benefit of the Agent and the Banks and their respective successors, transferees and assigns. Without limiting the generality of the foregoing sentence, each Bank may assign or otherwise transfer its rights under the Loan Agreement, the Term Note, the other Loan Documents or any other agreement or note held by it evidencing, securing or otherwise executed in connection with the Obligations, or sell participations in any interest therein, to any other entity or other person, and such other entity or other person shall thereupon become vested, to the extent set forth in the agreement evidencing such assignment, transfer or participation, with all the rights in respect thereof granted to such Bank herein, all in accordance with Section 16 of the Loan Agreement. The Guarantor may not assign any of its obligations hereunder. 12. AMENDMENTS AND WAIVERS. No amendment or waiver of any provision of this Guaranty nor consent to any departure by the Guarantor therefrom shall be effective unless the same shall be in writing and signed by the Agent. No failure on the part of the Agent or any Bank to exercise, and no delay in exercising, any right hereunder shall operate as a waiver thereof; nor shall any single or partial exercise of any right hereunder preclude any other or further exercise thereof or the exercise of any other right. 13. NOTICES. All notices and other communications called for hereunder shall be made in writing and, unless otherwise specifically provided herein, shall be deemed to have been duly made or given when delivered by hand, mailed by United States registered or certified first class mail, postage prepaid, sent by overnight courier, or sent by telegraph, telecopy or facsimile and confirmed by delivery via courier or postal service, at the address set forth beneath the signatures hereto, or at such address as either party may designate in writing to the other. SECTION 14. GOVERNING LAW; CONSENT TO JURISDICTION. THIS GUARANTY SHALL, PURSUANT TO NEW YORK GENERAL OBLIGATIONS LAW Section 5-1401, FOR ALL PURPOSES BE GOVERNED BY, AND CONSTRUED IN ACCORDANCE WITH, THE LAWS OF THE STATE OF NEW YORK. THE GUARANTOR AGREES THAT ANY SUIT FOR THE ENFORCEMENT OF THIS GUARANTY MAY BE BROUGHT IN THE COURTS OF THE STATE OF NEW YORK OR ANY FEDERAL COURT SITTING THEREIN AND CONSENTS TO THE NON-EXCLUSIVE JURISDICTION OF SUCH COURT AND TO SERVICE OF PROCESS IN ANY SUCH SUIT BEING MADE UPON THE GUARANTOR BY MAIL AT THE ADDRESS SPECIFIED BY REFERENCE IN Section 13. THE GUARANTOR HEREBY WAIVES ANY OBJECTION THAT IT MAY NOW OR HEREAFTER HAVE TO THE VENUE OF ANY SUCH SUIT OR ANY SUCH COURT OR THAT SUCH SUIT WAS BROUGHT IN AN INCONVENIENT COURT. 15. WAIVER OF JURY TRIAL. THE AGENT (ON BEHALF OF ITSELF AND EACH BANK) AND THE GUARANTOR HEREBY WAIVES ITS RIGHT TO A JURY TRIAL WITH RESPECT TO ANY ACTION OR CLAIM ARISING OUT OF ANY DISPUTE IN CONNECTION WITH THIS GUARANTY, ANY RIGHTS OR OBLIGATIONS HEREUNDER OR THE PERFORMANCE OF ANY OF SUCH RIGHTS OR OBLIGATIONS. Except as prohibited by law, the Guarantor hereby waives any right which it may have to claim or recover in any litigation referred to in the preceding sentence any special, exemplary, punitive or consequential damages or any damages other than, or in addition to, actual damages. The Guarantor (a) certifies that neither the Agent or any Bank nor any representative, agent or attorney of the Agent or any Bank has represented, expressly or otherwise, that the Agent or any Bank would not, in the event of litigation, seek to enforce the foregoing waivers and (b) acknowledges that, in entering into the Loan Agreement and the other Loan Documents to which the Agent or any Bank is a party, the Agent and the Banks are relying upon, among other things, the waivers and certifications contained in this Section 15. SECTION 16. ENTIRE AGREEMENT. This Guaranty constitutes the entire agreement of the Guarantor with respect to the matters set forth herein. SECTION 17. REMEDIES CUMULATIVE. The rights and remedies herein provided are cumulative and not exclusive of any remedies provided by law or any other agreement, and this Guaranty shall be in addition to any other guaranty of or collateral security for any of the Obligations. SECTION 18. SEVERABILITY. The invalidity or unenforceability of any one or more sections of this Guaranty shall not affect the validity or enforceability of its remaining provisions. SECTION 19. HEADINGS. The captions herein are for the ease of reference only and shall not affect the meaning of the relevant provision. The meanings of all defined terms used in this Guaranty shall be equally applicable to the singular and plural forms of the terms defined. [Remainder of page intentionally left blank] IN WITNESS WHEREOF, the Guarantor has caused this Guaranty to be executed and delivered as of the date first above written. BANGOR HYDRO-ELECTRIC COMPANY By: /s/ Carroll R. Lee -------------------------------------- Name: Carroll R. Lee Title: Senior Vice President and Chief Financial Officer 33 State Street, Bangor, Maine 04402 Fax: (207) 990-6963 ACCEPTED BY: BANKBOSTON, N.A., as Agent By: /s/ Michael M. Parker ------------------------ Michael M. Parker Managing Director 100 Federal Street Boston, Massachusetts 02110 Fax: (617) 434-3652