<PAGE>   1
                                                                    Exhibit 10.5

                                  AMENDMENT TO

             DIRECTORS' DEFERRED COMPENSATION PLAN OF MASSBANK CORP.


A.     The Directors' Deferred Compensation Plan of MASSBANK Corp. (the

"Plan") is hereby amended by deleting the last sentence of Article VII and by

substituting therefor the following sentence:


     "To the extent any deferred compensation of any director is deemed to be
     invested in the common stock of MASSBANK Corp., all benefit payments to
     such director shall be payable in the form of shares of common stock of
     MASSBANK Corp.


B.     This Amendment shall be effective as of March 8, 2000.

       IN WITNESS WHEREOF, MASSBANK Corp. has caused this Amendment to be

executed by its duly authorized officer this 8th day of March, 2000.


                                               MASSBANK

                                               By /s/ Reginald E. Cormier
                                                  ---------------------------
                                                  Sr. V.P., Treasurer and CFO



<PAGE>   2


                        DIRECTORS' DEFERRED COMPENSATION
                             PLAN OF MASSBANK CORP.

                        ARTICLE I. ESTABLISHMENT OF PLAN

     MASSBANK Corp., a Massachusetts corporation with a principal place of
business in Reading, Massachusetts (the "Company"), hereby establishes the
Directors' Deferred Compensation Plan of MASSBANK Corp. (the "Plan"). The Plan
is an unfunded deferred compensation arrangement for the directors of the
Company and is effective for deferrals of compensation for calendar years
beginning on and after January 1, 1988 (the "Effective Date").

                     ARTICLE II. ELIGIBILITY; PARTICIPATION

     All directors of the Company on the Effective Date and all persons who
become directors of the Company thereafter shall be eligible to participate in
the Plan and shall participate by timely executing and submitting a deferred
compensation election form as described in Article III.

                  ARTICLE III. DEFERRED COMPENSATION ELECTIONS

     Each eligible director shall be given the opportunity to defer receipt of
all or a portion of his/her director's compensation by executing a deferred
compensation election form provided by the Company. The election form must be
executed and returned prior to the beginning of the first calendar year to which
it relates. Amendments or revocations of the election form shall be effective
only for calendar years beginning after the execution and submission to the
Company of the amendment or revocation, as the case may be; provided, however,
that the form of benefit payment cannot be amended as provided in Article V.

           ARTICLE IV. PARTICIPANTS' ACCOUNTS; INVESTMENT REQUIREMENTS

     For each director who elects to participate in the Plan (a "Participant"),
the Company shall establish and maintain a memorandum account (for bookkeeping
purposes only) which shall be used to measure the benefits to be paid hereunder.
As part of the deferred compensation election form, each Participant shall be
given the opportunity to choose whether his/her deferred compensation shall be
measured as if it had been invested either in the MASSBANK for Savings Variable
IRA Account or the common stock of MASSBANK Corp. If the common stock of
MASSBANK Corp. is elected, any dividends paid shall be treated as reinvested in
such shares. The election of the investment measurement is to be made on the
first deferred compensation election form submitted by a Participant pursuant to
Article III. Such election shall apply to all compensation deferred under the
Plan and cannot be changed.

     The following credits shall be made to each Participant's account:

     a.  All compensation deferred pursuant to the Plan.

     b.  To the extent any deferred compensation is deemed to be invested in the
         MASSBANK for Savings Variable IRA Account, such interest as may be
         earned by such investment.

     c.  To the extent any deferred compensation is deemed to be invested
         in the common stock of MASSBANK Corp., the increase in value of such
         shares and any dividends paid thereon.



<PAGE>   3

     The following debits shall be made to each Participant's account:

     a.  To the extent any deferred compensation is deemed to be invested
         in the common stock of MASSBANK Corp., the decrease in value of such
         shares.

     b.  Any payments made under the Plan to the Participant or his/her
         beneficiaries.

              ARTICLE V. BENEFIT PAYMENTS OTHER THAN DEATH BENEFITS

     Except as provided in the last paragraph of this Article, a Participant
shall be entitled to benefits under the Plan as soon as practicable after the
earlier of (i) the Participant's attaining age 72, or (ii) his/her termination
as a director of the Company.

     At the election of the Participant, benefits shall be paid either in one
lump sum or in quarterly installments over a five (5) year period. If a lump sum
is elected, the benefit payable shall be the balance of the Participant's
account under the Plan on the payment date. If installment payments are elected,
the first installment shall equal 1/20 of the account balance on the payment
date, and each installment thereafter shall be calculated by multiplying the
account balance on the payment date by a fraction of which the numerator is one
and the denominator is one whole number less than the denominator of the
fraction used in calculating the immediately preceding quarterly installment
payment.


      The election of the form of benefit payment is to be made on the first
deferred compensation election form submitted by a Participant pursuant to
Article III. Such election shall apply to all compensation deferred under the
Plan and cannot be changed.

     Notwithstanding the foregoing, in the event the Company or its assets are
merged or acquired, payment of all account balances shall promptly be made to
all Participants in one lump sum.

                            ARTICLE VI DEATH BENEFITS

     In the event of the death of a Participant while amounts are held for
his/her benefit under the Plan and regardless of whether installment payments
have been elected or have commenced, a death benefit shall be paid as soon as
practicable to his/her beneficiaries in one lump sum. The amount of the death
benefit shall be the balance of the Participant's account under the Plan on the
payment date.

     Each Participant shall have the right to designate beneficiaries who are to
succeed to his/her right to receive payments in the event of his/her death. In
the case of a failure of a Participant to designate a beneficiary or of the
death of a designated beneficiary without a designated successor, the death
benefit shall be paid to the Participant's estate. No designation of
beneficiaries shall be valid unless in writing signed by the Participant, dated
and filed with the Company. Beneficiaries may be changed without the consent of
any prior beneficiaries.



<PAGE>   4

                 ARTICLE VII. NATURE OF PARTICIPANTS' INTERESTS

     The Plan is intended to constitute an unfunded deferred compensation
arrangement for a select group of management. The Participants shall have no
right, title or interest whatsoever in meeting its obligations under the Plan.
All such investments shall at all times remain solely the Company's property. To
the extent that any person acquires a right to receive payments from the Company
under the Plan, no such right shall be greater than an unsecured general
creditor of the Company. All payments to be made hereunder shall be paid from
the general funds of the Company, and no special or separate fund shall be
established, and no segregation of assets shall be made, to assure payments of
such amounts.

           ARTICLE VIII, AMENDMENT, SUSPENSION AND TERMINATION OF PLAN

     The Company's Board of Directors reserves the right at any time to amend,
suspend or terminate the Plan in whole or in part, for any reason, without the
consent of any Participant or beneficiary. No such amendment shall decrease any
interest of any Participant or beneficiary existing immediately prior to such
amendment.

                              AMENDMENT IX. GENERAL

     The benefit payments described in Articles V and VI are the only benefits
payable under the Plan, and the Participants and their beneficiaries are
responsible for any federal, state or local income taxes that may be due
thereon. Any income tax benefits the Company may derive from deducting these
benefit payments when made shall not be passed through to the Participants and
their beneficiaries.

     To the extent permitted by law, the right of any Participant or any
beneficiary to any benefit hereunder shall not be subject in any manner to
attachment or other legal process for the debts of such Participant or
beneficiary; and any such benefit shall not be subject to anticipation,
alienation, sale, transfer, assignment or encumbrance.

     Nothing contained in the Plan and no action taken pursuant to its
provisions shall create or be construed to create a trust of any kind or a
fiduciary relationship between the Company and any Participant or any other
person. The Company shall not be considered a trustee by reason of the Plan.

     Nothing contained in the Plan and no action taken pursuant to its
provisions shall create or be construed to create an agreement of employment or
as giving or conferring on any Participant the right to continue service on the
Company's Board of Directors.

     The Plan shall be binding upon and inure to the benefit of the Company, its
successors and assigns and each participant and his/her respective heirs,
personal representatives and beneficiaries.

     The Plan shall be construed in accordance with and governed by the laws of
the Commonwealth of Massachusetts.

     IN WITNESS WHEREOF, the Company has caused the Plan to be executed by its
officer thereunto duly authorized as of the Effective Date.

                                                MASSBANK Corp.

                                                By /s/ John H. Wood
                                                   -------------------
                                                its: President and CEO