1
                                                                       Exhibit 5


                  [Devine, Millimet & Branch, P.C. Letterhead]




                                December 22, 1997




CFX Corporation
102 Main Street
Keene, New Hampshire  03431

Ladies and Gentlemen:

         Reference is made to the Registration Statement on Form S-8 (the
"Registration Statement") of CFX Corporation, a New Hampshire corporation
("CFX"), relating to shares of CFX Common Stock, par value $0.66 2/3 per share
("CFX Common Stock"), which may be offered to holders of options ("CFX Options")
to purchase shares of CFX Common Stock made under the CFX Long-Term Incentive
Plan (the "CFX Plan"). You have asked us to furnish an opinion to be included as
Exhibit 5 to the Registration Statement.

         In conjunction with the furnishing of this opinion, we have examined
such corporate documents and have made such investigation of matters of fact and
law as we have deemed necessary to render this opinion. Based upon such
examination and investigation, and upon the assumptions that there will be no
material changes in the documents examined and the matters investigated, we are
of the opinion that:

         1.       The shares of CFX Common Stock that may be offered to holders 
                  of CFX Options have been duly authorized by CFX.

         2.       The shares of CFX Common Stock to be issued upon exercise of
                  any CFX Options granted in accordance with the terms of the
                  CFX Plan will be validly issued, fully paid and nonassessable.

         We consent to the filing of this opinion as an exhibit to the
Registration Statement, and to the reference to us in Item 5 thereof.

                                             Very truly yours,
 
                                             DEVINE, MILLIMET & BRANCH, P.C.