<PAGE>   1
                                                                   Exhibit 10.5


                          CHANGE OF CONTROL AGREEMENT


         AGREEMENT made as of this 27th day of January, 1997 between CFX
CORPORATION, a New Hampshire corporation (hereinafter "Company") and Gregg R.
Tewksbury, residing at Keene, New Hampshire (hereinafter "Executive").

         WHEREAS the Company wishes to assure the continued availability of the
Executive's services and to create an environment which will promote the
Executive's giving impartial and objective advice in any circumstances
resulting from the possibility of Change of Control of the Company (as herein
defined), and

         WHEREAS the Company and the Executive wish to provide the Executive
with financial protection in the event significant changes in the Executive's
employment status occur following a Change of Control of the Company (as herein
defined);

         NOW THEREFORE, the Company and the Executive, in consideration of the
terms and conditions set forth herein and other valuable consideration, receipt
of which is hereby acknowledged, mutually covenant and agree as follows:

1.       Term.

         The term of this Agreement shall commence on the date hereof and
terminate on the date three years from the date hereof unless the Executive's
employment is sooner terminated as provided in Section 13 hereof (the "Term").
On each December 31st thereafter, the Term shall automatically be extended for
an additional calendar year unless either party gives written notice to the
other, by no later than the preceding November 30th, that he or it does not
concur in such extension.

2.       Payments Upon Change of Control and Termination Event.

         The Company shall make payments to the Executive as provided for in
paragraph 4 hereof upon the occurrence of both a Change of Control of the
Company and a Termination Event, as such terms are defined in paragraph 3
hereof.

3.       Definitions.

         (a)   "Base Amount" shall mean an amount equal to the average annual
compensation payable by the Company, or any subsidiary in which the Company
owns more than fifty (50) percent of the outstanding shares, to the Executive
and includable by the Executive in gross income for the most recent five (5)
taxable years, or such shorter period as the Executive shall have been employed
by the Company, ending before the date on which the Change of Control occurred.

         (b)   A "Change of Control" shall be deemed to have occurred if any of
the following have occurred:
<PAGE>   2
               (i)    any individual, corporation (other than the Company),
         partnership, trust, association, pool, syndicate, or any other entity
         or any group of persons acting in concert becomes the beneficial
         owner, as that concept is defined in Rule 13d-3 promulgated by the
         Securities Exchange Commission under the Securities Exchange Act of
         1934, as the result of any  one or more securities transactions
         (including gifts and stock repurchases but excluding transactions
         described in subdivision (ii) following) of securities of the Company
         possessing fifty-one percent (51%) or more of the voting power for the
         election of directors of the Company;

               (ii)   there shall be consummated any consolidation, merger or
         stock-for-stock exchange involving securities of the Company in which
         the holders of voting securities of the Company immediately prior to
         such consummation own, as a group, immediately after such
         consummation, voting securities of the Company (or if the Company does
         not survive such transaction, voting  securities of the corporation
         surviving such transaction) having less than fifty percent (50%) of
         the total voting power in an election of directors of the Company (or
         such other surviving corporation), excluding securities received by
         any members of such group which represent disproportionate percentage
         increases in their shareholdings vis-a-vis the other members of such
         group;

               (iii)  "approved directors" shall constitute less than a
         majority of the entire Board of Directors of the Company, with
         "approved directors" defined to mean the members of the Board of
         Directors of the Company as of the date  of this Agreement and any
         subsequently elected members of the Board of Directors of the Company
         who shall be nominated or approved by a majority of the approved
         directors on the Board of Directors of the Company prior to such
         election; or

               (iv)   there shall be consummated any sale, lease, exchange or
         other transfer (in one transaction or a series of related
         transactions, excluding any transaction described in subdivision (ii)
         above), of all, or substantially all, of  the assets of the Company or
         its subsidiaries to a party which is not controlled by or under common
         control with the Company.

         (c)   A "Termination Event" shall be deemed to have occurred if,
within the thirty-six month period following a Change of Control, the Executive
experiences the loss of his position by reason of discharge or demotion, for
other than termination for good cause, or the Executive's voluntary termination
following the substantial withholding, substantial adverse alteration or
substantial reduction of responsibility, authority, or compensation (including
any compensation or benefit plan in which the Executive participates or
substitute plans adopted prior to the





                                      -2-
<PAGE>   3
Change of Control) to which the Executive was charged or empowered with or
entitled to immediately prior to a Change of Control of the Company or to which
he would normally be charged or empowered with or entitled to from time to time
by reason of his office, for other than good cause.

         (d)   Termination for Good Cause.

               "Termination for good cause" means termination:

               (i)    based on the willful and continued failure by the
         Executive to perform his duties for the Company or a subsidiary (other
         than such failure resulting from the Executive's incapacity due to
         physical or mental illness), after a written demand for performance is
         delivered to the Executive by the Board of Directors of the Company
         which specifically identifies the manner in which the Board believes
         the Executive has not performed his duties; an act or acts of
         dishonesty taken by the Executive; or an act or acts intended to
         result in his personal enrichment at the expense of the Company or a
         subsidiary; or an act or acts of willful misconduct which are
         materially injurious to the Company. Termination shall be by written
         notice to the Executive identifying the cause; or

               (ii)   If the Executive shall have been absent from the
         full-time performance of his duties with the Company for six
         consecutive months as the result of the Executive's incapacity due to
         physical or mental illness, and the Executive shall not have returned
         to full-time performance of his duties within thirty days after
         written notice of proposed termination, the Executive's employment may
         be terminated by the Company on or after the expiration of such thirty
         day period for disability. Termination shall be by written notice to
         the Executive. Termination of the Executive's employment based on
         retirement shall mean termination in accordance with the Company's
         generally applicable retirement policy or with any retirement
         arrangement established with the Executive's consent.

4.       Cash Payments.

         Upon the occurrence of both a Change of Control of the Company and a
Termination Event, the Company shall, during the period commencing on the date
of the Termination Event and over a period of twelve months (the "Pay-Out
Period"), make equal monthly payments to the Executive in an amount such that
the present value of all such payments, determined as of the date of the
Termination Event, equals 1.0 times the Base Amount.

5.       Advance Payments for Financial Hardship.

         If at any time during the Pay-Out Period the Company's Board of
Directors in its sole discretion shall concur, upon application of the
Executive, the Company





                                      -3-
<PAGE>   4
shall make available to the Executive, in one (l) lump sum, an amount up to but
not greater than the present value of all monthly payments remaining to be paid
to him in the Pay-Out Period, calculated with the Federal Funds rate in effect
as of the date of such Board concurrence. If (a) the lump sum amount thus made
available is less than (b) the present value of all such remaining monthly
payments, the Company shall continue to pay to the Executive monthly payments
for the duration of the Pay-Out Period, but from such date forward such monthly
payments will be in a reduced amount such that the present value of such
payments will equal the difference between (b) and (a), above. The Executive
may elect to waive any or all payments due him under this subparagraph.

6.       Death of Executive.

         If the Executive dies before receiving all payments payable to him
under this Agreement, the Company shall pay to the Executive's spouse, or if
the Executive leaves no spouse, to the estate of the Executive, one (l) lump
sum payment in an amount equal to the present value of all such remaining
unpaid payments, determined as of the date of death of the Executive.

7.       Reimbursement of Expenses.

         In the event a Change of Control of the Company and a Termination
Event occur and any action, suit or proceeding is brought by the Company or the
Executive for the enforcement, performance or construction of this Agreement,
the Company agrees to reimburse the Executive for all costs and expenses
reasonably incurred by him in such action, suit or proceeding, including
reasonable attorneys' and accountants' fees and expenses, unless the Executive
shall have been substantially unsuccessful, on the merits or otherwise, in such
action, suit or proceeding.

8.       No Duty to Seek Other Employment.

         Amounts payable to the Executive under this Agreement shall not be
reduced by the amount of any compensation received by the Executive from any
other employer or source during the Pay-Out Period, and the Executive shall not
be under any obligation to seek other employment or gainful pursuit during such
Pay-Out Period as a result of this Agreement.

9.       Non-Competition, Future Services and Compensation.

         (a)   During such period as the Executive is receiving cash payments
under this Agreement, the Executive agrees:

               (i)    that he shall not, without the prior approval of the
         Board of Directors of the Company, certified to him by the Secretary
         or Acting





                                      -4-
<PAGE>   5
         Secretary of the Company, become an officer, employee, agent, partner,
         or director of any other business in substantial competition with the
         Company, its subsidiaries or any other company or bank affiliated with
         the Company, including any branch or office of any of the foregoing.
         Such restriction shall apply to any such other business doing business
         in any county in the State of New Hampshire in which the Company, its
         subsidiaries or any such other company or bank is then conducting any
         material business or into which, to the knowledge of the Executive at
         the time of such termination, any such entity has immediate plans to
         expand its activities in material respects; and

               (ii)   to provide such consulting services as may be requested
         by the Company.

         (b)   As compensation to the Executive for his promises in (a) of this
paragraph, the Bank agrees to maintain, during such period, the Executive's
eligibility for and participation in any health and life insurance plans, in
which the Executive was eligible to participate prior to the Termination Event.

10.      Reduction of Payments.

         In the event any of the payments made under this Agreement would be
considered an "excess parachute payment" as defined in Section 280G of the
Internal Revenue Code of 1986, as amended, then there shall be a reduction in
the amount otherwise payable under this Agreement such that all payments are
deductible by the Company.

11.      Withholding.

         Distribution of any payments under this Agreement shall be reduced for
the amount required to be withheld pursuant to any law or regulation with
respect to taxes or similar provisions.

12.      Payment of Compensation to Termination Date.

         In addition to any other payments payable to the Executive hereunder,
the Company shall pay the Executive full compensation and all other amounts and
benefits to which the Executive is entitled through the termination of his
employment.

13.      No Right to Continued Employment.

         This Agreement shall not confer upon the Executive any right with
respect to continuance of employment by the Company or any subsidiary, nor
shall it interfere in any way with the right of his employer to terminate his
employment at any time.





                                      -5-
<PAGE>   6
No payments hereunder shall be required except upon the occurrence of both a
Change of Control of the Company and a Termination Event as set forth in
Section 3 herein. Thus, except as specifically provided in Section 2 herein, no
payments hereunder shall be made on account of termination of the Executive's
employment (i) upon the Executive's death, disability or retirement, (ii) by
the Company with or without cause or (iii) upon the Executive's voluntary
termination.

14.      Waiver of Breach.

         Waiver by any party of a breach of any provision of this Agreement
shall not operate as or be construed as a waiver by such party of any
subsequent breach hereof.

15.      Invalidity.

         The invalidity or unenforceability of any provision of this Agreement
shall not affect the validity or enforceability of any other provision, which
shall remain in full force and effect.

16.      Entire Agreement; Written Modification; Termination.

         This Agreement contains the entire agreement between the parties
concerning the matters covered hereby. No modification, amendment or waiver of
any provision hereof shall be effective unless in writing specifically
referring hereto and signed by the party against whom such provision as
modified or amended or such waiver is sought to be enforced. This Agreement
shall terminate as of the time the Company makes the final payment which it may
be obligated to pay hereunder or provides the final benefit which it may be
obligated to provide hereunder.

17.      Counterparts.

         This Agreement may be made and executed in counterparts, each of which
may be considered an original for all purposes.

18.      Governing Law.

         This Agreement is governed by and is to be construed and enforced in
accordance with the laws of the State of New Hampshire.

19.      Authorization.

         The Company represents and warrants that the execution of this
Agreement has been duly authorized by resolution of the Board of Directors of
the Company.





                                      -6-
<PAGE>   7
         IN WITNESS WHEREOF, the undersigned parties have executed or caused to
be executed this Agreement as of the day and year first above written.

                                     CFX CORPORATION
                                     ---------------




                            By:      /s/
                                     ------------------------------------
                                     Peter J. Baxter             its duly
                                     ---------------------------
                                     authorized President and CEO        .
                                                -------------------------




                            "EXECUTIVE"



                                     /s/
                                     -----------------------------------
                                     Gregg R. Tewksbury





                                      -7-