KEEGAN, WERLIN & PABIAN, LLP
                                Attorneys At Law
                             21 Custom House Street
                        Boston, Massachusetts 02110-3525
                                 (617) 951-1400
                                                                 Telecopiers:
                                                                 (617) 951-1354
                                                                 (617) 951-0586

                                            June 25, 1997



Essex County Gas Company
7 North Hunt Road
Amesbury, Massachusetts  01913

          Re:  Registration of 200,000 Shares of Essex County Gas Company Common
               Stock with the Securities and Exchange Commission

Ladies and Gentlemen:

     We have acted as  special  counsel to Essex  County Gas  Company  (formerly
Haverhill  Gas  Company)  (the  "Company"),  a  Massachusetts  corporation,   in
connection with certain  regulatory  matters relating to the issuance of 200,000
shares  of  the  Company's  common  stock  pursuant  to the  Company's  Dividend
Reinvestment  and Common  Stock  Purchase  Plan (the  "Plan").  The  Company has
requested us to provide  this opinion in  connection  with the  preparation  and
filing of a Registration Form S-3 (the "Registration  Statement") by the Company
under  the  Securities  Act  of  1933,  as  amended,   in  connection  with  the
authorization and issuance of 200,000 shares of common stock.

     The  opinions  expressed  herein  are  based  on the  examination  and  the
discussion, assumptions and exceptions set forth below.




Essex County Gas Company
June 25, 1997
Page 2

In preparing this opinion, we have reviewed:

         1.    the Company's Articles of Organization, as amended;

         2.    the by-laws of the Company;

         3.    certain votes adopted by the board of directors of the Company;

         4.    a  certificate  of legal  existence of the Company of recent date
               issued   by  the   Secretary   State  of  the   Commonwealth   of
               Massachusetts;

         5.    the Order of the Massachusetts  Department of Public Utilities in
               Essex County Gas Company,  D.P.U. 96-121 (May 14, 1997), relating
               to the issuance of Common Stock as described in the  Registration
               Statement.

     We have  made  such  examination  of  Massachusetts  law as we have  deemed
relevant for the purposes of this opinion,  but we have not made an  independent
review of the laws of any state other than the Commonwealth of Massachusetts. We
have not made an  independent  review of other  federal laws.  Accordingly,  all
opinions rendered herein are limited to the existing laws of the Commonwealth of
Massachusetts as applied by courts located in Massachusetts,  as amended, all as
in effect on the date  hereof.  We express no opinion as to choice of laws or as
to the laws of any other jurisdiction.  In addition, we express no opinion as to
any antitrust or securities law (except such portion of M.G.L.  c. 164 as may be
considered  securities laws), Federal Reserve Board margin regulations,  pension
and employee benefit laws and regulations (e.g., ERISA), Federal and state labor
laws, local law, fraudulent transfer and fraudulent  conveyance laws, any law or
regulation relating to intellectual  property,  and Federal and state health and
safety laws and regulations.

                                      


Essex County Gas Company
June 25, 1997
Page 3


     We have assumed that all  applicable  laws and  regulations  have been duly
enacted  and  validly  promulgated,  that all  regulatory  agencies,  boards and
commissions  have been  duly  constituted,  that all  public  officials  and all
members of said agencies,  boards and  commissions  have been duly appointed and
are lawfully holding the positions to which they have been elected or appointed,
and that any actions  taken by them under  delegated  authority  are  undertaken
pursuant to properly  delegated  authority.

     In our  examination  and in  rendering  this  opinion,  we have assumed the
genuineness of all signatures,  the legal capacity of natural  persons,  and the
power and  authority of all  persons,  other than  officers of the Company,  the
authenticity and completeness of all documents submitted to us as originals, the
conformity to original  documents of all documents  submitted to us as certified
or photostatic  copies and the authenticity and completeness of the originals of
such latter documents. 

     We have  assumed  that the  constitutionality  or  validity  of a  relevant
statute,  rule,  regulation  or  agency  act is not in issue  unless a  reported
decision  in the  relevant  jurisdiction  has  specifically  addressed  but  not
resolved, or has established,  its  unconstitutionality or invalidity.

     Based on the foregoing and having regard for such legal  considerations  as
we have deemed relevant,  it is our opinion that:

          1.   The Company is a corporation duly and validly existing under the
               laws of the Commonwealth of Massachusetts.

          2.   The  Shares  have  been  duly   authorized  and  when  issued  in
               accordance with the Plan will be validly  issued,  fully paid and
               nonassessable.
                                      

Essex County Gas Company
June 25, 1997
Page 4

     
         3.    All required  proceedings before the Massachusetts  Department of
               Public Utilities in connection with the  authorization,  issuance
               and sale of the Shares  have been  completed,  and all  consents,
               approvals,  authorizations  or other orders of the  Massachusetts
               Department  of Public  Utilities  that are required for the valid
               issuance and sale of the Shares as contemplated in the Prospectus
               have been duly and  properly  obtained  and  remain  valid and in
               effect. (See, Essex County Gas Company, D.P.U.
               96-121, May 14, 1997).

     This  opinion is  rendered  only to you and is solely  for your  benefit in
connection with the Registration Statement.  This opinion may not be relied upon
by you for any other  purpose and may not be furnished  to, quoted to, or relied
upon by any other person for any purpose without our prior written consent.

                                        Very truly yours,

                                        /S/ Keegan, Werlin & Pabian
 
                                        Keegan, Werlin & Pabian, LLP
                                        21 Custom House Street
                                        Boston, MA  02110



RAK/joc